]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit58b3306023704f3246b03775e0595d20aeaace00
treee996a1de9216337a7b69e276d8ab412e9cde01c3
parent15bf84376bc81f5139006edb0a40ff96d57ec856
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: c35e250097f3 ("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