* [PATCH] ASoC: stm32: sai: Add missing cleanup
@ 2020-04-05 15:03 Julia Lawall
2020-04-06 9:44 ` Olivier MOYSAN
2020-04-06 14:03 ` Applied "ASoC: stm32: sai: Add missing cleanup" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2020-04-05 15:03 UTC (permalink / raw)
To: Olivier Moysan
Cc: kernel-janitors, Arnaud Pouliquen, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Maxime Coquelin, Alexandre Torgue,
alsa-devel, linux-stm32, linux-arm-kernel, linux-kernel
The commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
converts some function calls to their non-devm equivalents. The
appropriate cleanup code was added to the remove function, but not
to the probe function. Add a call to snd_dmaengine_pcm_unregister
to compensate for the call to snd_dmaengine_pcm_register in case
of subsequent failure.
Fixes: commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
---
Not tested.
sound/soc/stm/stm32_sai_sub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 2bd280c..0d0c9af 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1556,8 +1556,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
ret = snd_soc_register_component(&pdev->dev, &stm32_component,
&sai->cpu_dai_drv, 1);
- if (ret)
+ if (ret) {
+ snd_dmaengine_pcm_unregister(&pdev->dev);
return ret;
+ }
if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
conf = &stm32_sai_pcm_config_spdif;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: stm32: sai: Add missing cleanup
2020-04-05 15:03 [PATCH] ASoC: stm32: sai: Add missing cleanup Julia Lawall
@ 2020-04-06 9:44 ` Olivier MOYSAN
2020-04-06 14:03 ` Applied "ASoC: stm32: sai: Add missing cleanup" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Olivier MOYSAN @ 2020-04-06 9:44 UTC (permalink / raw)
To: Julia Lawall
Cc: kernel-janitors, Arnaud POULIQUEN, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Maxime Coquelin, Alexandre TORGUE,
alsa-devel, linux-stm32, linux-arm-kernel, linux-kernel
On 4/5/20 5:03 PM, Julia Lawall wrote:
> The commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
> converts some function calls to their non-devm equivalents. The
> appropriate cleanup code was added to the remove function, but not
> to the probe function. Add a call to snd_dmaengine_pcm_unregister
> to compensate for the call to snd_dmaengine_pcm_register in case
> of subsequent failure.
>
> Fixes: commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>
> ---
>
> Not tested.
>
> sound/soc/stm/stm32_sai_sub.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Hi Julia,
Thanks for the patch.
Acked-by: Olivier Moysan <olivier.moysan@st.com>
>
> diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
> index 2bd280c..0d0c9af 100644
> --- a/sound/soc/stm/stm32_sai_sub.c
> +++ b/sound/soc/stm/stm32_sai_sub.c
> @@ -1556,8 +1556,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
>
> ret = snd_soc_register_component(&pdev->dev, &stm32_component,
> &sai->cpu_dai_drv, 1);
> - if (ret)
> + if (ret) {
> + snd_dmaengine_pcm_unregister(&pdev->dev);
> return ret;
> + }
>
> if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
> conf = &stm32_sai_pcm_config_spdif;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: stm32: sai: Add missing cleanup" to the asoc tree
2020-04-05 15:03 [PATCH] ASoC: stm32: sai: Add missing cleanup Julia Lawall
2020-04-06 9:44 ` Olivier MOYSAN
@ 2020-04-06 14:03 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-04-06 14:03 UTC (permalink / raw)
To: Julia Lawall
Cc: Alexandre Torgue, alsa-devel, Arnaud Pouliquen, kernel-janitors,
Liam Girdwood, linux-arm-kernel, linux-kernel, linux-stm32,
Mark Brown, Maxime Coquelin, Olivier Moysan, Takashi Iwai
The patch
ASoC: stm32: sai: Add missing cleanup
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From 7506baeed8d05fc164254c64af14cfed2ac14446 Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Sun, 5 Apr 2020 17:03:48 +0200
Subject: [PATCH] ASoC: stm32: sai: Add missing cleanup
The commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
converts some function calls to their non-devm equivalents. The
appropriate cleanup code was added to the remove function, but not
to the probe function. Add a call to snd_dmaengine_pcm_unregister
to compensate for the call to snd_dmaengine_pcm_register in case
of subsequent failure.
Fixes: commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Acked-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/1586099028-5104-1-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/stm/stm32_sai_sub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 2bd280c01c33..0d0c9afd8791 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1556,8 +1556,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
ret = snd_soc_register_component(&pdev->dev, &stm32_component,
&sai->cpu_dai_drv, 1);
- if (ret)
+ if (ret) {
+ snd_dmaengine_pcm_unregister(&pdev->dev);
return ret;
+ }
if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
conf = &stm32_sai_pcm_config_spdif;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-06 14:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 15:03 [PATCH] ASoC: stm32: sai: Add missing cleanup Julia Lawall
2020-04-06 9:44 ` Olivier MOYSAN
2020-04-06 14:03 ` Applied "ASoC: stm32: sai: Add missing cleanup" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).