Skip to content

Commit

Permalink
staging: comedi: adl_pci9118: if test should use logical AND not bitw…
Browse files Browse the repository at this point in the history
…ise AND

This quiets a couple sparse warnings about:

warning: dubious: !x & y

Also, remove the unnecessary parentheses around the variables.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 11, 2012
1 parent 47db6d5 commit 0bdf8ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci9118.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 0bdf8ec

Please sign in to comment.