Skip to content

Commit

Permalink
staging:ti dspbridge: replace simple_strtoul by strict_strtoul
Browse files Browse the repository at this point in the history
Replace simple_strtoul by strict_strtoul in atoi function.

Signed-off-by: Ernesto Ramos <ernesto@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ernesto Ramos authored and Greg Kroah-Hartman committed Jul 28, 2010
1 parent b3c8aef commit ecd3d0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/staging/tidspbridge/rmgr/dbdcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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;
}

/*
Expand Down

0 comments on commit ecd3d0c

Please sign in to comment.