Message ID | 20220929150653.63845-4-zhangqilong3@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 96e4abbd35adb5582573c463ccc554a644ac2434 |
Headers | show |
Series | Fix PM disable depth imbalance in probe | expand |
On Thu, Sep 29, 2022 at 11:06:52PM +0800, Zhang Qilong wrote: > 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. We fix it by calling > pm_runtime_disable when error returns. > > Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver") > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > v2: > - call pm_runtime_disable when error returns > --- Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index af7d324e3352..adaf886b0a9d 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -2142,6 +2142,7 @@ static int wm5102_probe(struct platform_device *pdev) arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0); arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102); err_jack_codec_dev: + pm_runtime_disable(&pdev->dev); arizona_jack_codec_dev_remove(&wm5102->core); return ret;
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. We fix it by calling pm_runtime_disable when error returns. Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> --- v2: - call pm_runtime_disable when error returns --- sound/soc/codecs/wm5102.c | 1 + 1 file changed, 1 insertion(+)