Skip to content

Commit

Permalink
power: supply: mt6370: Fix missing error code in mt6370_chg_toggle_cfo()
Browse files Browse the repository at this point in the history
[ Upstream commit 779873e ]

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: 233cb8a ("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>
  • Loading branch information
harshimogalapalli authored and gregkh committed Oct 6, 2023
1 parent 64adb41 commit 1ea6975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/mt6370-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1ea6975

Please sign in to comment.