]> Pileus Git - ~andy/linux/blobdiff - drivers/misc/hmc6352.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[~andy/linux] / drivers / misc / hmc6352.c
index 423cd40f1c0f425274ebdaa0dc35efc0f47ca466..170bd3daf33699598a794e4a58a9df19a917c279 100644 (file)
@@ -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);