[PATCH] staging: speakup: replace simple_strtoul with kstrtoul

From: samuel kihahu
Date: Wed Dec 17 2014 - 08:31:05 EST


Replacing obsolete simple_strtoul with kstrtoul and checking the
return status.

Signed-off-by: samuel kihahu <skihahu@xxxxxxxxx>
---
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


--17pEHd4RhPHOinZp--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/