From: Andreas Ruprecht Date: Tue, 29 Nov 2011 10:43:28 +0000 (+0100) Subject: Staging: iio/adc: strict_strtoul was used with a long type variable X-Git-Tag: v3.3-rc1~152^2~101^2~147 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d3ff1cc99eb869af040e34c0bbe3035cc5c203b;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed