mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
staging: iio: cdc: Remove explicit comparisons
Remove comparisons to 0 or NULL Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eee587ea87
commit
e6e65f97db
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user