diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-12-09 11:09:07 +0000 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2019-12-09 20:18:14 +0900 |
commit | 9c8eaec8ebe41198b10599f2586750d8900afd97 (patch) | |
tree | 527eb1cf2ec4c71057405ce13c22f6b967ddac30 /drivers/extcon | |
parent | e42617b825f8073569da76dc4510bfa019b1c35a (diff) | |
download | linux-9c8eaec8ebe41198b10599f2586750d8900afd97.tar.bz2 |
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 <ckeepax@opensource.cirrus.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index e970134c95fa..79e9a2410182 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -724,6 +724,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) return; err: + arizona_extcon_hp_clamp(info, false); + pm_runtime_put_autosuspend(info->dev); + regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); |