]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: rzg2l_adc: Fix -EBUSY timeout error return
authorColin Ian King <colin.king@canonical.com>
Tue, 17 Aug 2021 17:21:11 +0000 (18:21 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 29 Aug 2021 17:00:42 +0000 (18:00 +0100)
commitf2223affb474fda3d1e486e7f1c5e8c6d139bce3
treed02143348374dac7cc3112a5d40e7e7bad2d3e30
parent7956cf5d76b1ff99935fef9e6a4b242e5e582f7e
iio: adc: rzg2l_adc: Fix -EBUSY timeout error return

Currently when a timeout occurs in rzg2l_adc_hw_init the error -EBUSY is
assigned to ret but the error code is used as the function is hard-coded
to return 0.  The variable ret is 0 before entering the while-loop hence
the fix is just to return ret at the end of the function to return the
success 0 or -EBUSY return code.

Addresses-Coverity: ("Unused value")
Fixes: d484c21bacfa ("iio: adc: Add driver for Renesas RZ/G2L A/D converter")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210817172111.495897-1-colin.king@canonical.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/rzg2l_adc.c