From: Dan Carpenter Date: Thu, 11 Nov 2010 22:05:13 +0000 (-0800) Subject: drivers/misc/bh1770glc.c: error handling in bh1770_power_state_store() X-Git-Tag: v2.6.37-rc2~61 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aec04288904a7308f2900926902040e7a69ae2be;p=pandora-kernel.git drivers/misc/bh1770glc.c: error handling in bh1770_power_state_store() There was a signedness bug so "ret" was never less than zero and that breaks the error handling. Also in the original code it would overwrite ret and the result is still negative but it's bogus number instead of the correct error code. Signed-off-by: Dan Carpenter Cc: Samu Onkalo Cc: Jonathan Cameron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed