summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/msm8916-wcd-analog.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/msm8916-wcd-analog.c')
-rw-r--r--sound/soc/codecs/msm8916-wcd-analog.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index cf6516693e4e..5a8eedea6be0 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -1196,8 +1196,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
irq = platform_get_irq_byname(pdev, "mbhc_switch_int");
if (irq < 0) {
- dev_err(dev, "failed to get mbhc switch irq\n");
- return irq;
+ ret = irq;
+ goto err_disable_clk;
}
ret = devm_request_threaded_irq(dev, irq, NULL,
@@ -1211,8 +1211,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
if (priv->mbhc_btn_enabled) {
irq = platform_get_irq_byname(pdev, "mbhc_but_press_det");
if (irq < 0) {
- dev_err(dev, "failed to get button press irq\n");
- return irq;
+ ret = irq;
+ goto err_disable_clk;
}
ret = devm_request_threaded_irq(dev, irq, NULL,
@@ -1225,8 +1225,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det");
if (irq < 0) {
- dev_err(dev, "failed to get button release irq\n");
- return irq;
+ ret = irq;
+ goto err_disable_clk;
}
ret = devm_request_threaded_irq(dev, irq, NULL,
@@ -1244,6 +1244,10 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
return devm_snd_soc_register_component(dev, &pm8916_wcd_analog,
pm8916_wcd_analog_dai,
ARRAY_SIZE(pm8916_wcd_analog_dai));
+
+err_disable_clk:
+ clk_disable_unprepare(priv->mclk);
+ return ret;
}
static int pm8916_wcd_analog_spmi_remove(struct platform_device *pdev)