summaryrefslogtreecommitdiffstats
path: root/drivers/misc/hmc6352.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/hmc6352.c')
-rw-r--r--drivers/misc/hmc6352.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c
index 423cd40f1c0f..170bd3daf336 100644
--- a/drivers/misc/hmc6352.c
+++ b/drivers/misc/hmc6352.c
@@ -46,8 +46,9 @@ static int compass_store(struct device *dev, const char *buf, size_t count,
int ret;
unsigned long val;
- if (strict_strtoul(buf, 10, &val))
- return -EINVAL;
+ ret = kstrtoul(buf, 10, &val);
+ if (ret)
+ return ret;
if (val >= strlen(map))
return -EINVAL;
mutex_lock(&compass_mutex);