Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
ASoC: ti: Fix runtime PM imbalance in omap2_mcbsp_set_clks_src
Browse files Browse the repository at this point in the history
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 <dinghao.liu@zju.edu.cn>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200525085848.4227-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
dinghaoliu authored and broonie committed May 26, 2020
1 parent edc475b commit c553d29
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sound/soc/ti/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c553d29

Please sign in to comment.