From: Dinghao Liu Date: Mon, 25 May 2020 08:58:48 +0000 (+0800) Subject: ASoC: ti: Fix runtime PM imbalance in omap2_mcbsp_set_clks_src X-Git-Tag: Ubuntu-5.10.0-12.13~2616^2^2~56 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c553d290577093553098a56c954e516950c35c59;p=mirror_ubuntu-hirsute-kernel.git ASoC: ti: Fix runtime PM imbalance in omap2_mcbsp_set_clks_src When clk_set_parent() returns an error code, a pairing runtime PM usage counter increment is needed to keep the counter balanced. Signed-off-by: Dinghao Liu Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200525085848.4227-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown --- diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index 4e67769b795a..32e3ccdbb7a2 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -77,18 +77,15 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) pm_runtime_put_sync(mcbsp->dev); r = clk_set_parent(mcbsp->fclk, fck_src); - if (r) { + if (r) dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n", src); - clk_put(fck_src); - return r; - } pm_runtime_get_sync(mcbsp->dev); clk_put(fck_src); - return 0; + return r; } static irqreturn_t omap_mcbsp_irq_handler(int irq, void *data)