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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:25 +0000 (19:47 +0100)
commit77541a0b0413aca181d0ca2a1ea513455fc700e7
treeccfd2459aee53d80aafc78171ce327cb0d91c744
parent19bc535e37295c45339b49e88b695b8b1ad01a35
usb: gadget: udc: net2272: Fix bitwise and boolean operations

commit 07c69f1148da7de3978686d3af9263325d9d60bd upstream.

(!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: ceb80363b2ec ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/net2272.c