]> git.karo-electronics.de Git - linux-beck.git/commit
Staging: iio: signedness bug
authorDan Carpenter <error27@gmail.com>
Tue, 10 Aug 2010 05:37:33 +0000 (07:37 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 18:40:35 +0000 (11:40 -0700)
commit213fd2270450f7b5f98803e58bc25063c249e032
treef74f3f4548db896173ddd25ccb80abe4c1c0adf9
parentd1ae4da731a6e049a675097ebfd9a02b9b50530e
Staging: iio: signedness bug

i2c_smbus_read_byte_data() returns an s32 type.  We need to change
"rate" to signed for the error handling to work.

Also I changed it to propogate the error code instead of just returning
-EINVAL.  Other error codes could be -EAGAIN for example.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/magnetometer/hmc5843.c