summaryrefslogtreecommitdiff
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorCristina Moraru <cristina.moraru09@gmail.com>2015-10-20 22:55:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-25 05:32:09 +0300
commite6e65f97db4ebd6a9aec26eccca2992eb638afd3 (patch)
treead7baa1b4675d32f1be6f772d2faa9621b47dd39 /drivers/staging/iio
parenteee587ea87343777f51825c532462635dd2e4157 (diff)
downloadlinux-e6e65f97db4ebd6a9aec26eccca2992eb638afd3.tar.xz
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>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/cdc/ad7150.c2
-rw-r--r--drivers/staging/iio/cdc/ad7152.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 636a7ee4a508..e8d0ff2d5c9b 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -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);
diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c
index c3d5531f73c2..485d0a5af53c 100644
--- a/drivers/staging/iio/cdc/ad7152.c
+++ b/drivers/staging/iio/cdc/ad7152.c
@@ -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;
}