summaryrefslogtreecommitdiff
path: root/drivers/misc/apds9802als.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/apds9802als.c')
-rw-r--r--drivers/misc/apds9802als.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index 5b5fd8416b3e..0c6e037153d2 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -126,8 +126,9 @@ static ssize_t als_sensing_range_store(struct device *dev,
int ret_val;
unsigned long val;
- if (strict_strtoul(buf, 10, &val))
- return -EINVAL;
+ ret_val = kstrtoul(buf, 10, &val);
+ if (ret_val)
+ return ret_val;
if (val < 4096)
val = 1;