]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:adt7410: Fix adt7410_set_mode return value
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 22 Oct 2012 09:42:00 +0000 (10:42 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 17 Nov 2012 10:17:17 +0000 (10:17 +0000)
commitacdc649798006b8214f3cf30ddde74b18690740f
tree3132d0748245897d032833c13e777850d05d4964
parent47c5255e33c984e8d03f7e58e50b23050e150bc9
staging:iio:adt7410: Fix adt7410_set_mode return value

The function is expected to return the number of bytes consumed and as long as
not all bytes have been consumed the function will be called again. Currently
the function returns 'ret', which will always be 0 in this case, so we end up in
a endless loop since the caller will assume that no bytes have been consumed. So
instead return len as it is supposed to.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/adt7410.c