Commit 32887570 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Sebastian Reichel
Browse files

power: supply: ab8500: Fix error handling when calling iio_read_channel_processed()



The ab8500_charger_get_[ac|vbus]_[current|voltage]() functions should
return an error code on error.

Up to now, an un-initialized value is returned.
This makes the error handling of the callers un-reliable.

Return the error code instead, to fix the issue.

Fixes: 97ab78ba ("power: supply: ab8500_charger: Convert to IIO ADC")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/f9f65642331c9e40aaebb888589db043db80b7eb.1719037737.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent ad175de1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment