* [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
@ 2025-03-10 17:45 Christophe JAILLET
2025-03-11 13:45 ` Charles Keepax
2025-03-12 12:39 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2025-03-10 17:45 UTC (permalink / raw)
To: amadeuszx.slawinski, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Dimitris Papastamos, Charles Keepax
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, Mark Brown,
patches, linux-sound
Free some resources in the error handling path of the probe, as already
done in the remove function.
Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver")
Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested-only.
Changes in v2:
- Fix a typo in a label (s/free_irq/free_riq) [Amadeusz Sławiński]
v1: https://lore.kernel.org/all/ee39ba19b8c4c157ce04e06096a8f54016831959.1741549792.git.christophe.jaillet@wanadoo.fr/
---
sound/soc/codecs/wm0010.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index edd2cb185c42..28b43fe4dc32 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
if (ret) {
dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
irq, ret);
- return ret;
+ goto free_irq;
}
if (spi->max_speed_hz)
@@ -932,9 +932,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
&soc_component_dev_wm0010, wm0010_dai,
ARRAY_SIZE(wm0010_dai));
if (ret < 0)
- return ret;
+ goto disable_irq_wake;
return 0;
+
+disable_irq_wake:
+ irq_set_irq_wake(wm0010->irq, 0);
+
+free_irq:
+ if (wm0010->irq)
+ free_irq(wm0010->irq, wm0010);
+
+ return ret;
}
static void wm0010_spi_remove(struct spi_device *spi)
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
2025-03-10 17:45 [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() Christophe JAILLET
@ 2025-03-11 13:45 ` Charles Keepax
2025-03-12 12:39 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2025-03-11 13:45 UTC (permalink / raw)
To: Christophe JAILLET
Cc: amadeuszx.slawinski, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Dimitris Papastamos, Charles Keepax, linux-kernel,
kernel-janitors, Mark Brown, patches, linux-sound
On Mon, Mar 10, 2025 at 06:45:36PM +0100, Christophe JAILLET wrote:
> Free some resources in the error handling path of the probe, as already
> done in the remove function.
>
> Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver")
> Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
2025-03-10 17:45 [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() Christophe JAILLET
2025-03-11 13:45 ` Charles Keepax
@ 2025-03-12 12:39 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-03-12 12:39 UTC (permalink / raw)
To: amadeuszx.slawinski, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Dimitris Papastamos, Charles Keepax, Christophe JAILLET
Cc: linux-kernel, kernel-janitors, Mark Brown, patches, linux-sound
On Mon, 10 Mar 2025 18:45:36 +0100, Christophe JAILLET wrote:
> Free some resources in the error handling path of the probe, as already
> done in the remove function.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
commit: ed92bc5264c4357d4fca292c769ea9967cd3d3b6
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-12 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 17:45 [PATCH v2] ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() Christophe JAILLET
2025-03-11 13:45 ` Charles Keepax
2025-03-12 12:39 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox