]> git.baikalelectronics.ru Git - kernel.git/commit
iio:addac:ad74413r: Fix uninitialized ret in a path that won't be hit.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 20 Dec 2021 16:47:26 +0000 (16:47 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 21 Dec 2021 15:10:10 +0000 (15:10 +0000)
commit9e158757f98fdec78b86c94e4438a4237ae23f6f
tree27bb86d5e3636f34bb9a5888b9b09150dc3753fb
parent6c68b20093215e6e8ef6202fa22c03ad1abbba04
iio:addac:ad74413r: Fix uninitialized ret in a path that won't be hit.

I don't believe it's possible to hit this, because we drop
out of __iio_update_buffers() earlier in the event of an empty
list.  However, that is not visible to the compiler so lets
return an error if we do hit the loop with an empty bitmask.

Fixes: 955712f260a0 ("iio: addac: ad74413r: fix off by one in ad74413r_parse_channel_config()")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20211220164726.3136307-1-jic23@kernel.org
drivers/iio/addac/ad74413r.c