]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc: net2272: Fix bitwise and boolean operations
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 22 Jan 2019 21:28:08 +0000 (15:28 -0600)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 28 Jan 2019 13:27:21 +0000 (15:27 +0200)
commit0d7131dd14940ae3802dead169978f15548d9f9d
treef53fd268280d847c697af3c98d0f7e1bc9994f5c
parentfc5fdce4106695d3e060e66e6328a750ca20bb5b
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: f845e5bd212a ("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>
drivers/usb/gadget/udc/net2272.c