]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/misc/bh1770glc.c: error handling in bh1770_power_state_store()
authorDan Carpenter <error27@gmail.com>
Thu, 11 Nov 2010 22:05:13 +0000 (14:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Nov 2010 15:55:31 +0000 (07:55 -0800)
commit21354fe24d4ec3cbf220a5f0d0ecc04c70292df2
treedc897e5ee40107d92216a930494138a12706eb95
parent06d9eff34bd2bafb6f458a50ea1dd9e9c0057543
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 <error27@gmail.com>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/bh1770glc.c