diff mbox series

sh/intc: Fix obsolete function

Message ID 1559124971-13074-1-git-send-email-dingxiang@cmss.chinamobile.com (mailing list archive)
State New, archived
Headers show
Series sh/intc: Fix obsolete function | expand

Commit Message

Ding Xiang May 29, 2019, 10:16 a.m. UTC
simple_strtoul is obsolete, use kstrtoul instead.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
 drivers/sh/intc/userimask.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c
index 87d69e7..d1d8e9b 100644
--- a/drivers/sh/intc/userimask.c
+++ b/drivers/sh/intc/userimask.c
@@ -33,7 +33,8 @@ 
 {
 	unsigned long level;
 
-	level = simple_strtoul(buf, NULL, 10);
+	if (kstrtoul(buf, 10, &level))
+		return -EINVAL;
 
 	/*
 	 * Minimal acceptable IRQ levels are in the 2 - 16 range, but