staging: iio: cdc: Remove explicit comparisons
authorCristina Moraru <cristina.moraru09@gmail.com>
Tue, 20 Oct 2015 19:55:43 +0000 (22:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:32:09 +0000 (19:32 -0700)
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/cdc/ad7150.c
drivers/staging/iio/cdc/ad7152.c

index 636a7ee4a5082b120f12a59a33b360319567c18b..e8d0ff2d5c9b9cbd1ec0ffcb7b0c027c44beed0a 100644 (file)
@@ -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);
index c3d5531f73c2640c79bf78812242e686922d3d9c..485d0a5af53c8ac1f4b74abdec236254de56ffdc 100644 (file)
@@ -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;
                }