Skip to content
Commit 934ed384 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Sebastian Reichel
Browse files

power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'



In the probe function, in case of error, resources allocated in
'lp8788_setup_adc_channel()' must be released.

This can be achieved easily by using the devm_ variant of
'iio_channel_get()'.
This has the extra benefit to simplify the remove function and to axe the
'lp8788_release_adc_channel()' function which is now useless.

Fixes: 98a27664 ("power_supply: Add new lp8788 charger driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent a776f560
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment