aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshit Mogalapalli2023-09-06 01:48:15 -0700
committerGreg Kroah-Hartman2023-10-06 14:56:46 +0200
commit1ea6975aa68aeb05a8ee95a64023d1c6edea54f7 (patch)
tree718c4b8d93e2ea567e05e9b835770b72cb4b6fb0
parent64adb41644fcd2d6127a2b0aeae5c9fcdb1ecbbe (diff)
power: supply: mt6370: Fix missing error code in mt6370_chg_toggle_cfo()
[ Upstream commit 779873ec81306d2c40c459fa7c91a5d40655510d ] When mt6370_chg_field_get() suceeds, ret is set to zero and returning zero when flash led is still in strobe mode looks incorrect. Fixes: 233cb8a47d65 ("power: supply: mt6370: Add MediaTek MT6370 charger driver") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: ChiaEn Wu <chiaen_wu@richtek.com> Link: https://lore.kernel.org/r/20230906084815.2827930-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/power/supply/mt6370-charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/mt6370-charger.c b/drivers/power/supply/mt6370-charger.c
index f27dae5043f5..a9641bd3d8cf 100644
--- a/drivers/power/supply/mt6370-charger.c
+++ b/drivers/power/supply/mt6370-charger.c
@@ -324,7 +324,7 @@ static int mt6370_chg_toggle_cfo(struct mt6370_priv *priv)
if (fl_strobe) {
dev_err(priv->dev, "Flash led is still in strobe mode\n");
- return ret;
+ return -EINVAL;
}
/* cfo off */