diff mbox

dspbridge: Fix atoi to support hexadecimal numbers correctly

Message ID 1292161177-5266-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Delegated to:
Headers show

Commit Message

Laurent Pinchart Dec. 12, 2010, 1:39 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 3581a55..b76f26c 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -1020,8 +1020,6 @@  static s32 atoi(char *psz_buf)
 {
 	char *pch = psz_buf;
 	s32 base = 0;
-	unsigned long res;
-	int ret_val;
 
 	while (isspace(*pch))
 		pch++;
@@ -1033,9 +1031,7 @@  static s32 atoi(char *psz_buf)
 		base = 16;
 	}
 
-	ret_val = strict_strtoul(pch, base, &res);
-
-	return ret_val ? : res;
+	return simple_strtoul(pch, NULL, base);
 }
 
 /*