diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
commit | b4b7ff4b08e691656c9d77c758fc355833128ac0 (patch) | |
tree | 82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/staging/iio/light/isl29018.c | |
parent | 35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff) |
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/staging/iio/light/isl29018.c')
-rw-r--r-- | drivers/staging/iio/light/isl29018.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 019ba5245..bbf7e35cb 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -117,12 +117,10 @@ static int isl29018_set_integration_time(struct isl29018_chip *chip, { int i, ret; unsigned int int_time, new_int_time; - struct isl29018_scale new_scale; for (i = 0; i < ARRAY_SIZE(isl29018_int_utimes[chip->type]); ++i) { if (utime == isl29018_int_utimes[chip->type][i]) { new_int_time = i; - new_scale = isl29018_scales[new_int_time][0]; break; } } @@ -370,7 +368,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 +714,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; } |