summaryrefslogtreecommitdiffstats
path: root/drivers/soc/xilinx
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2018-01-15 13:15:28 -0600
committerMichal Simek <michal.simek@xilinx.com>2018-01-16 15:50:20 +0100
commit2a7157b137f6f4804fbd60e8734574373212105b (patch)
treeeac53f0c9cee9a753fce61ff7837242d93f26a10 /drivers/soc/xilinx
parent05015061222d10a3cb87e6046940abfe42114927 (diff)
downloadlinux-2a7157b137f6f4804fbd60e8734574373212105b.tar.gz
linux-2a7157b137f6f4804fbd60e8734574373212105b.tar.bz2
linux-2a7157b137f6f4804fbd60e8734574373212105b.zip
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')
-rw-r--r--drivers/soc/xilinx/xlnx_vcu.c2
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;