Skip to content

Commit 9c8eaec

Browse files
charleskeepaxchanwoochoi
authored andcommitted
extcon: arizona: Correct clean up if arizona_identify_headphone fails
In the error path of arizona_identify_headphone, neither the clamp nor the PM runtime are cleaned up. Add calls to clean up both of these. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent e42617b commit 9c8eaec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/extcon/extcon-arizona.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info)
724724
return;
725725

726726
err:
727+
arizona_extcon_hp_clamp(info, false);
728+
pm_runtime_put_autosuspend(info->dev);
729+
727730
regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1,
728731
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
729732

0 commit comments

Comments
 (0)