]> git.baikalelectronics.ru Git - kernel.git/commit
iio: ensure ret is initialized to zero before entering do loop
authorColin Ian King <colin.king@canonical.com>
Mon, 5 Sep 2016 14:39:06 +0000 (15:39 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 Sep 2016 20:00:14 +0000 (21:00 +0100)
commit0e259194969e52c6594dee9e6a451a4d1ebf568c
tree96fafd56a772bf8f6d7ea6c562b484f92e091552
parent9347ec6c58c2324a88f400b5eb7b2d719c8d22cf
iio: ensure ret is initialized to zero before entering do loop

A recent fix to iio_buffer_read_first_n_outer removed ret from being set by
a return from wait_event_interruptible and also added a continue in a loop
which causes the variable ret to not be set when it reaches the end of the
loop.  Fix this by initializing ret to zero.

Also remove extraneous white space at the end of the loop.

Fixes: c36b04bf4c2faa ("fix sched WARNING "do not call blocking ops when !TASK_RUNNING")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c