summaryrefslogtreecommitdiff
path: root/sound/soc/meson/axg-fifo.c
diff options
context:
space:
mode:
authorPavel Machek (CIP) <pavel@denx.de>2020-06-06 17:31:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 17:50:19 +0200
commitefdb1bf81aab0f68b90da9e052502fd05f9f5e49 (patch)
treecb220c7b887caa97e19cd9946154b5294e21bada /sound/soc/meson/axg-fifo.c
parent390f1688fb4648474b29c8ea6c2c710b689cd669 (diff)
ASoC: meson: add missing free_irq() in error path
[ Upstream commit 3b8a299a58b2afce464ae11324b59dcf0f1d10a7 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc/meson/axg-fifo.c')
-rw-r--r--sound/soc/meson/axg-fifo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index d286dff3171d..898ef1d5608f 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -244,7 +244,7 @@ static int axg_fifo_pcm_open(struct snd_pcm_substream *ss)
/* 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,
@@ -264,8 +264,14 @@ static int axg_fifo_pcm_open(struct snd_pcm_substream *ss)
/* 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;
}