summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/light/isl29018.c
diff options
context:
space:
mode:
authorCristina Moraru <cristina.moraru09@gmail.com>2015-10-20 19:55:40 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-25 02:32:09 (GMT)
commitd59b7b68344df4a2a9eb31e0d667692bfa43a690 (patch)
tree15ce417e9a29ecb6d21a8e7ca55d92edeba32e7c /drivers/staging/iio/light/isl29018.c
parent9efbbfada99cd553fa16f66a49b98acf011080a9 (diff)
downloadlinux-d59b7b68344df4a2a9eb31e0d667692bfa43a690.tar.xz
staging: iio: light: 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/light/isl29018.c')
-rw-r--r--drivers/staging/iio/light/isl29018.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
index 019ba52..73109dd 100644
--- a/drivers/staging/iio/light/isl29018.c
+++ b/drivers/staging/iio/light/isl29018.c
@@ -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;
}