[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1df96e7b-89fa-7822-1a57-b9a87e8388c0@st.com>
Date: Mon, 6 Apr 2020 09:44:13 +0000
From: Olivier MOYSAN <olivier.moysan@...com>
To: Julia Lawall <Julia.Lawall@...ia.fr>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Arnaud POULIQUEN <arnaud.pouliquen@...com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre TORGUE <alexandre.torgue@...com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: stm32: sai: Add missing cleanup
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@...ia.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@...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;
>
Powered by blists - more mailing lists