Skip to content

Commit

Permalink
ASoC: meson: add missing free_irq() in error path
Browse files Browse the repository at this point in the history
free_irq() is missing in case of error, fix that.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>

Link: https://lore.kernel.org/r/20200606153103.GA17905@amd
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Pavel Machek (CIP) authored and Mark Brown committed Jun 9, 2020
1 parent 8a9144c commit 3b8a299
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sound/soc/meson/axg-fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
/* Enable pclk to access registers and clock the fifo ip */
ret = clk_prepare_enable(fifo->pclk);
if (ret)
return ret;
goto free_irq;

/* Setup status2 so it reports the memory pointer */
regmap_update_bits(fifo->map, FIFO_CTRL1,
Expand All @@ -269,8 +269,14 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
/* Take memory arbitror out of reset */
ret = reset_control_deassert(fifo->arb);
if (ret)
clk_disable_unprepare(fifo->pclk);
goto free_clk;

return 0;

free_clk:
clk_disable_unprepare(fifo->pclk);
free_irq:
free_irq(fifo->irq, ss);
return ret;
}
EXPORT_SYMBOL_GPL(axg_fifo_pcm_open);
Expand Down

0 comments on commit 3b8a299

Please sign in to comment.