Commit 779873ec authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Sebastian Reichel

power: supply: mt6370: Fix missing error code in mt6370_chg_toggle_cfo()

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: 233cb8a4 ("power: supply: mt6370: Add MediaTek MT6370 charger driver")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarChiaEn Wu <chiaen_wu@richtek.com>
Link: https://lore.kernel.org/r/20230906084815.2827930-1-harshit.m.mogalapalli@oracle.comSigned-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent dc77721e
...@@ -324,7 +324,7 @@ static int mt6370_chg_toggle_cfo(struct mt6370_priv *priv) ...@@ -324,7 +324,7 @@ static int mt6370_chg_toggle_cfo(struct mt6370_priv *priv)
if (fl_strobe) { if (fl_strobe) {
dev_err(priv->dev, "Flash led is still in strobe mode\n"); dev_err(priv->dev, "Flash led is still in strobe mode\n");
return ret; return -EINVAL;
} }
/* cfo off */ /* cfo off */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment