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

Commit e6e65f97 authored by Cristina Moraru's avatar Cristina Moraru Committed by Greg Kroah-Hartman
Browse files

staging: iio: cdc: Remove explicit comparisons



Remove comparisons to 0 or NULL

Signed-off-by: default avatarCristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eee587ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -219,7 +219,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
	u64 event_code;
	u64 event_code;


	/* Something must always be turned on */
	/* Something must always be turned on */
	if (state == 0)
	if (!state)
		return -EINVAL;
		return -EINVAL;


	event_code = IIO_UNMOD_EVENT_CODE(chan->type, chan->channel, type, dir);
	event_code = IIO_UNMOD_EVENT_CODE(chan->type, chan->channel, type, dir);
+1 −1
Original line number Original line Diff line number Diff line
@@ -290,7 +290,7 @@ static int ad7152_write_raw(struct iio_dev *indio_dev,
		ret = 0;
		ret = 0;
		break;
		break;
	case IIO_CHAN_INFO_SCALE:
	case IIO_CHAN_INFO_SCALE:
		if (val != 0) {
		if (val) {
			ret = -EINVAL;
			ret = -EINVAL;
			goto out;
			goto out;
		}
		}