summaryrefslogtreecommitdiff
path: root/drivers/iio/light/apds9306.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/light/apds9306.c')
-rw-r--r--drivers/iio/light/apds9306.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
index d6627b3e6000..66a063ea3db4 100644
--- a/drivers/iio/light/apds9306.c
+++ b/drivers/iio/light/apds9306.c
@@ -583,8 +583,8 @@ static int apds9306_intg_time_set(struct apds9306_data *data, int val2)
return ret;
intg_old = iio_gts_find_int_time_by_sel(&data->gts, intg_time_idx);
- if (ret < 0)
- return ret;
+ if (intg_old < 0)
+ return intg_old;
if (intg_old == val2)
return 0;