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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
Showing
想要评论请 注册 或 登录