staging: iio: light: Remove explicit comparisons
[firefly-linux-kernel-4.4.55.git] / drivers / staging / iio / light / isl29018.c
index 019ba5245c2363ac2e671dcde9c4378eb19dcc02..73109dd4011419fe57c6917e6a8b29088fd1a1a6 100644 (file)
@@ -370,7 +370,7 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
                break;
        case IIO_CHAN_INFO_INT_TIME:
                if (chan->type == IIO_LIGHT) {
-                       if (val != 0) {
+                       if (val) {
                                mutex_unlock(&chip->lock);
                                return -EINVAL;
                        }
@@ -716,7 +716,7 @@ static int isl29018_probe(struct i2c_client *client,
        int dev_id = 0;
 
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
-       if (indio_dev == NULL) {
+       if (!indio_dev) {
                dev_err(&client->dev, "iio allocation fails\n");
                return -ENOMEM;
        }