Skip to content
Unverified Commit f75c544d authored by Herve Codina's avatar Herve Codina Committed by Mark Brown
Browse files

iio: inkern: Check error explicitly in iio_channel_read_max()



The current implementation returns the error code as part of the
default switch case.
This can lead to returning an incorrect positive value in case of
iio_avail_type enum entries evolution.

In order to avoid this case, be more strict in error checking.

Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-4-herve.codina@bootlin.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b5f34841
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment