From ecd3d0ca4006f86a542bfd5ed1277cac6b2df3be Mon Sep 17 00:00:00 2001 From: Ernesto Ramos Date: Wed, 28 Jul 2010 09:40:52 -0500 Subject: [PATCH] staging:ti dspbridge: replace simple_strtoul by strict_strtoul Replace simple_strtoul by strict_strtoul in atoi function. Signed-off-by: Ernesto Ramos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/tidspbridge/rmgr/dbdcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c index cceceb93f673..b96aea77b809 100644 --- a/drivers/staging/tidspbridge/rmgr/dbdcd.c +++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c @@ -1012,6 +1012,8 @@ static s32 atoi(char *psz_buf) { char *pch = psz_buf; s32 base = 0; + unsigned long res; + int ret_val; while (isspace(*pch)) pch++; @@ -1023,7 +1025,9 @@ static s32 atoi(char *psz_buf) base = 16; } - return simple_strtoul(pch, NULL, base); + ret_val = strict_strtoul(pch, base, &res); + + return ret_val ? : res; } /* -- 2.39.5