>From 71d2f7123e697b95371585b4af9a0b35262307ea Mon Sep 17 00:00:00 2001 From: samuel kihahu Date: Wed, 17 Dec 2014 16:31:05 +0300 Subject: [PATCH] staging: speakup: replace simple_strtoul with kstrtoul Replacing obsolete simple_strtoul with kstrtoul and checking the return status. Signed-off-by: samuel kihahu --- drivers/staging/speakup/varhandlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index d758284..8ac9ad7 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -321,9 +321,10 @@ char *spk_strlwr(char *s) char *spk_s2uchar(char *start, char *dest) { - int val = 0; + unsigned long val; - val = simple_strtoul(skip_spaces(start), &start, 10); + if (kstrtoul(skip_spaces(start), &start, val)) + return -EINVAL; if (*start == ',') start++; *dest = (u_char)val; -- 1.8.3.1