lkml.org 
[lkml]   [2020]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 095/717] ASoC: wm8998: Fix PM disable depth imbalance on error
    Date
    From: Zhang Qilong <zhangqilong3@huawei.com>

    [ Upstream commit 193aa0a043645220d2a2f783ba06ae13d4601078 ]

    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.

    Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    sound/soc/codecs/wm8998.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
    index f6c5cc80c970b..5413254295b70 100644
    --- a/sound/soc/codecs/wm8998.c
    +++ b/sound/soc/codecs/wm8998.c
    @@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev)

    ret = arizona_init_spk_irqs(arizona);
    if (ret < 0)
    - return ret;
    + goto err_pm_disable;

    ret = devm_snd_soc_register_component(&pdev->dev,
    &soc_component_dev_wm8998,
    @@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev)

    err_spk_irqs:
    arizona_free_spk_irqs(arizona);
    +err_pm_disable:
    + pm_runtime_disable(&pdev->dev);

    return ret;
    }
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-12-28 16:39    [W:4.333 / U:0.884 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site