summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-19 16:07:21 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-22 12:41:29 -0800
commit2b88adf60a7d3da2831671e68cdb9c4bd7d5b567 (patch)
tree4b655672b40e44eeea0276a182516d4242aa60f1
parent29039af358ff95bdd3f44cb218eba7c29cb644e4 (diff)
downloadlwn-2b88adf60a7d3da2831671e68cdb9c4bd7d5b567.tar.gz
lwn-2b88adf60a7d3da2831671e68cdb9c4bd7d5b567.zip
EDAC: Replace strict_strtol() with kstrtol()
commit c542b53da9ffa4fe9de61149818a06aacae531f8 upstream. The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/edac/edac_mc_sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index c4d700a577d2..6022550cbbc2 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -58,8 +58,10 @@ static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
if (!val)
return -EINVAL;
- ret = strict_strtol(val, 0, &l);
- if (ret == -EINVAL || ((int)l != l))
+ ret = kstrtol(val, 0, &l);
+ if (ret)
+ return ret;
+ if ((int)l != l)
return -EINVAL;
*((int *)kp->arg) = l;