Skip to content

Commit 07c69f1

Browse files
GustavoARSilvaFelipe Balbi
authored andcommitted
usb: gadget: udc: net2272: Fix bitwise and boolean operations
(!x & y) strikes again. Fix bitwise and boolean operations by enclosing the expression: intcsr & (1 << NET2272_PCI_IRQ) in parentheses, before applying the boolean operator '!'. Notice that this code has been there since 2011. So, it would be helpful if someone can double-check this. This issue was detected with the help of Coccinelle. Fixes: ceb8036 ("USB: net2272: driver for PLX NET2272 USB device controller") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
1 parent 1e19cdc commit 07c69f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/udc/net2272.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ static irqreturn_t net2272_irq(int irq, void *_dev)
20832083
#if defined(PLX_PCI_RDK2)
20842084
/* see if PCI int for us by checking irqstat */
20852085
intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT);
2086-
if (!intcsr & (1 << NET2272_PCI_IRQ)) {
2086+
if (!(intcsr & (1 << NET2272_PCI_IRQ))) {
20872087
spin_unlock(&dev->lock);
20882088
return IRQ_NONE;
20892089
}

0 commit comments

Comments
 (0)