mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
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: cee8113a29
("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>
This commit is contained in:
parent
0501506122
commit
2a7157b137
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user