Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 583d8231 authored by Tomas Melin's avatar Tomas Melin Committed by Greg Kroah-Hartman
Browse files

Staging: Comedi adv_pci1710: Combined two conditions



Combined two if statements making the code cleaner, removing one level
of indentation.

Signed-off-by: default avatarTomas Melin <tomas.melin@iki.fi>
Acked-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e0031dd
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1168,10 +1168,9 @@ static int check_channel_list(struct comedi_device *dev,
	for (i = 1, seglen = 1; i < n_chan; i++, seglen++) {
		if (chanlist[0] == chanlist[i])
			break;	/*  we detected a loop, stop */
		if (CR_CHAN(chanlist[i]) & 1)
			if (CR_AREF(chanlist[i]) == AREF_DIFF) {
				comedi_error(dev,
					     "Odd channel cannot be differential input!\n");
		if ((CR_CHAN(chanlist[i]) & 1) &&
		    (CR_AREF(chanlist[i]) == AREF_DIFF)) {
			comedi_error(dev, "Odd channel cannot be differential input!\n");
			return 0;
		}
		nowmustbechan =