diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-12-09 14:09:07 +0300 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2019-12-09 14:18:14 +0300 |
commit | 9c8eaec8ebe41198b10599f2586750d8900afd97 (patch) | |
tree | 527eb1cf2ec4c71057405ce13c22f6b967ddac30 | |
parent | e42617b825f8073569da76dc4510bfa019b1c35a (diff) | |
download | linux-9c8eaec8ebe41198b10599f2586750d8900afd97.tar.xz |
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>
-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); |