X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fmisc%2Fhmc6352.c;h=170bd3daf33699598a794e4a58a9df19a917c279;hb=b028161fbba178ccd35aa69051c04d7673fe9d80;hp=423cd40f1c0f425274ebdaa0dc35efc0f47ca466;hpb=c817eebec5971febab86d397582954bd52f403a8;p=~andy%2Flinux diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c index 423cd40f1c0..170bd3daf33 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);