diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-08-01 18:56:17 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-08-01 18:56:17 +0100 |
commit | 2b4ec22d36d46d03d01d1ec2436080d982284f36 (patch) | |
tree | e143c4f38e4ddc275bd29373bdd9869f659a24fd /drivers/iio | |
parent | 2fa03b92b62982c420c9c77a58bda52b96ed8ba4 (diff) | |
parent | 1e96e93a3569fd7a4d3199d9d912345ad3b8ce4c (diff) |
Merge branch 'fixes-togreg' into togreg
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/frequency/ad9523.c | 2 | ||||
-rw-r--r-- | drivers/iio/light/si1133.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index 38a8f73bd8d9..f4a508107f0d 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -522,7 +522,7 @@ static ssize_t ad9523_store(struct device *dev, return ret; if (!state) - return 0; + return len; mutex_lock(&st->lock); switch ((u32)this_attr->address) { diff --git a/drivers/iio/light/si1133.c b/drivers/iio/light/si1133.c index d3fbeb3bc463..5ac22c46da1f 100644 --- a/drivers/iio/light/si1133.c +++ b/drivers/iio/light/si1133.c @@ -838,7 +838,7 @@ static int si1133_write_raw(struct iio_dev *iio_dev, switch (chan->type) { case IIO_INTENSITY: case IIO_UVINDEX: - if (val != 0 || val != 1) + if (val != 0 && val != 1) return -EINVAL; return si1133_update_adcsens(data, |