power: supply: ab8500_charger: Fix inconsistent IS_ERR and PTR_ERR
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 21 Oct 2019 17:49:37 +0000 (12:49 -0500)
committerSebastian Reichel <sre@kernel.org>
Sun, 27 Oct 2019 21:33:07 +0000 (22:33 +0100)
commitf457055a7922154bb786e5d55f75b461fa645e9a
treee996a1de9216337a7b69e276d8ab412e9cde01c3
parente3da2ce04e120b4b035793f6eb87b459a505e88b
power: supply: ab8500_charger: Fix inconsistent IS_ERR and PTR_ERR

Fix inconsistent IS_ERR and PTR_ERR in ab8500_charger_probe().

The proper pointer to be passed as argument is di->adc_main_charger_c

This bug was detected with the help of Coccinelle.

Fixes: 97ab78bac5d0 ("power: supply: ab8500_charger: Convert to IIO ADC")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_charger.c