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

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
......@@ -219,7 +219,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
u64 event_code;
/* Something must always be turned on */
if (state == 0)
if (!state)
return -EINVAL;
event_code = IIO_UNMOD_EVENT_CODE(chan->type, chan->channel, type, dir);
......
......@@ -290,7 +290,7 @@ static int ad7152_write_raw(struct iio_dev *indio_dev,
ret = 0;
break;
case IIO_CHAN_INFO_SCALE:
if (val != 0) {
if (val) {
ret = -EINVAL;
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment