Skip to contentSkip to conversation

staging: comedi: adl_pci9118: if test should use logical AND not bitwise AND

PATCH New H Hartley Sweeten 1 participant 1 message Jun 8, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: adl_pci9118: if test should use logical AND not bitwise AND

This quiets a couple sparse warnings about:

warning: dubious: !x & y

Also, remove the unnecessary parentheses around the variables.

Cc Ian Abbott <[email protected]>
Cc Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---

drivers/staging/comedi/drivers/adl_pci9118.c +1 -1
index 3670ebd..5a5c903 100644
@@ -1735,7 +1735,7 @@ static int check_channel_list(struct comedi_device *dev,
 							"can't be mixtured!");
 				return 0;
 			}
-			if ((!devpriv->usemux) & (differencial) &
+			if (!devpriv->usemux && differencial &&
 			    (CR_CHAN(chanlist[i]) >= this_board->n_aichand)) {
 				comedi_error(dev,
 					     "If AREF_DIFF is used then is "