diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2018-01-15 22:15:28 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-01-16 17:50:20 +0300 |
commit | 2a7157b137f6f4804fbd60e8734574373212105b (patch) | |
tree | eac53f0c9cee9a753fce61ff7837242d93f26a10 /drivers/soc/xilinx/xlnx_vcu.c | |
parent | 05015061222d10a3cb87e6046940abfe42114927 (diff) | |
download | linux-2a7157b137f6f4804fbd60e8734574373212105b.tar.xz |
soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on clkoutdiv
Currently clkoutdiv is being operated on by a logical && operator rather
than a bitwise & operator. This looks incorrect as these should be bit
flag operations.
Addresses-Coverity-ID: 1463959 ("Logical vs. bitwise operator")
Fixes: cee8113a295a ("soc: xilinx: xlnx_vcu: Add Xilinx ZYNQMP VCU logicoreIP init driver")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Dhaval Shah <dshah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/soc/xilinx/xlnx_vcu.c')
-rw-r--r-- | drivers/soc/xilinx/xlnx_vcu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c index c1d6f1b190b6..a840c0272135 100644 --- a/drivers/soc/xilinx/xlnx_vcu.c +++ b/drivers/soc/xilinx/xlnx_vcu.c @@ -334,7 +334,7 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu) */ vcu_pll_ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_CTRL); clkoutdiv = vcu_pll_ctrl >> VCU_PLL_CTRL_CLKOUTDIV_SHIFT; - clkoutdiv = clkoutdiv && VCU_PLL_CTRL_CLKOUTDIV_MASK; + clkoutdiv = clkoutdiv & VCU_PLL_CTRL_CLKOUTDIV_MASK; if (clkoutdiv != 1) { dev_err(xvcu->dev, "clkoutdiv value is invalid\n"); return -EINVAL; |