diff options
| -rw-r--r-- | drivers/iio/light/opt4001.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/light/opt4001.c b/drivers/iio/light/opt4001.c index 944923cb8f28..2448d6330489 100644 --- a/drivers/iio/light/opt4001.c +++ b/drivers/iio/light/opt4001.c @@ -269,6 +269,9 @@ static int opt4001_write_raw(struct iio_dev *indio_dev, switch (mask) { case IIO_CHAN_INFO_INT_TIME: + if (val) + return -EINVAL; + int_time = opt4001_als_time_to_index(val2); if (int_time < 0) return int_time; |
