All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc/meson: add missing free_irq() in error path
@ 2020-06-06 15:31 ` Pavel Machek
  0 siblings, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2020-06-06 15:31 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai, khilman, alsa-devel,
	linux-amlogic, linux-kernel, trivial

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

free_irq() is missing in case of error, fix that.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index 2e9b56b29d31..b2e867113226 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -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,
@@ -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);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-07 18:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-06 15:31 [PATCH] soc/meson: add missing free_irq() in error path Pavel Machek
2020-06-06 15:31 ` Pavel Machek
2020-06-07 20:43 ` Jerome Brunet
2020-06-07 20:43   ` Jerome Brunet
2020-06-08 11:40 ` Mark Brown
2020-06-08 11:40   ` Mark Brown
2020-06-08 11:40   ` Mark Brown
2020-06-08 11:57 ` Mark Brown
2020-06-08 11:57   ` Mark Brown
2020-06-08 11:57   ` Mark Brown
2020-06-09 12:54 ` Mark Brown
2020-06-09 12:54   ` Mark Brown
2020-07-07 18:51 ` patchwork-bot+linux-amlogic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.