Commit c553d290 authored by Dinghao Liu's avatar Dinghao Liu Committed by Mark Brown

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: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200525085848.4227-1-dinghao.liu@zju.edu.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent edc475be
...@@ -77,18 +77,15 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) ...@@ -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); pm_runtime_put_sync(mcbsp->dev);
r = clk_set_parent(mcbsp->fclk, fck_src); 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", dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
src); src);
clk_put(fck_src);
return r;
}
pm_runtime_get_sync(mcbsp->dev); pm_runtime_get_sync(mcbsp->dev);
clk_put(fck_src); clk_put(fck_src);
return 0; return r;
} }
static irqreturn_t omap_mcbsp_irq_handler(int irq, void *data) static irqreturn_t omap_mcbsp_irq_handler(int irq, void *data)
......
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