Commit c5abd777 authored by Mark Brown's avatar Mark Brown

Merge series "Fix PM disable depth imbalance on error" from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. This series of patches
fixed it.

Zhang Qilong (3):
  ASoC: wm8994: Fix PM disable depth imbalance on error
  ASoC: wm8997: Fix PM disable depth imbalance on error
  ASoC: wm8998: Fix PM disable depth imbalance on error

 sound/soc/codecs/wm8994.c | 6 +++++-
 sound/soc/codecs/wm8997.c | 9 +++++++--
 sound/soc/codecs/wm8998.c | 4 +++-
 3 files changed, 15 insertions(+), 4 deletions(-)

--
2.25.4
parents 2aff94e4 193aa0a0
...@@ -4645,8 +4645,12 @@ static int wm8994_probe(struct platform_device *pdev) ...@@ -4645,8 +4645,12 @@ static int wm8994_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
pm_runtime_idle(&pdev->dev); pm_runtime_idle(&pdev->dev);
return devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8994, ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8994,
wm8994_dai, ARRAY_SIZE(wm8994_dai)); wm8994_dai, ARRAY_SIZE(wm8994_dai));
if (ret < 0)
pm_runtime_disable(&pdev->dev);
return ret;
} }
static int wm8994_remove(struct platform_device *pdev) static int wm8994_remove(struct platform_device *pdev)
......
...@@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev) ...@@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev)
ret = arizona_init_spk_irqs(arizona); ret = arizona_init_spk_irqs(arizona);
if (ret < 0) if (ret < 0)
return ret; goto err_pm_disable;
ret = devm_snd_soc_register_component(&pdev->dev, ret = devm_snd_soc_register_component(&pdev->dev,
&soc_component_dev_wm8998, &soc_component_dev_wm8998,
...@@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev) ...@@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev)
err_spk_irqs: err_spk_irqs:
arizona_free_spk_irqs(arizona); arizona_free_spk_irqs(arizona);
err_pm_disable:
pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment