iio: buffer: Fix uninitialized variable ret
When !iio_buffer_space_available(rb) is true and signal_pending(current) is false the end of the do-while loop is reached and the uninitialized variable ret is zero checked. Fix this by initializing variable ret to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 9eeee3b0 ("iio: Add output buffer support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20211015153254.33783-1-colin.king@canonical.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment