aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorAndreas Ruprecht <[email protected]>2011-11-29 11:43:28 +0100
committerGreg Kroah-Hartman <[email protected]>2011-11-30 19:37:33 +0900
commit6d3ff1cc99eb869af040e34c0bbe3035cc5c203b (patch)
tree8e0b64f62843d86abbf6cd93440d1ce081957afd /tools/perf/scripts/python/bin
parentd83fb184945cd2daaafd33a702bba9cb7ed502bf (diff)
Staging: iio/adc: strict_strtoul was used with a long type variable
The function ad7280_store_balance_timer() parses data from a char* buffer into a long variable, but uses the the function strict_strtoul which expects a pointer to an unsigned long variable as its third parameter. As Dan Carpenter mentioned, the values are capped a few lines later, but a check if val is negative is missing. Now this function will return -ERANGE if there is a representation of a negative number in buf. Additionally the checkpatch.pl considers strict_strtoul as obsolete. I replaced its call with the suggested kstrtoul. Signed-off-by: Andreas Ruprecht <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions