[16/28] ASoC: soc-core: initialize rtd->list
diff mbox series

Message ID 87ef1z2ife.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series
  • ASoC: cleanup patches for soc-core
Related show

Commit Message

Kuninori Morimoto Aug. 6, 2019, 1:29 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

No one initialize rtd->list, so far.
Let's do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ranjani Sridharan Aug. 6, 2019, 5 a.m. UTC | #1
On Tue, 2019-08-06 at 10:29 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> No one initialize rtd->list, so far.
> Let's do it.
Morimoto-san,

I dont think this is needed. The rtd->list is not meant to be a list
but rather just as a member of the card->rtd_list. So no need to
initialize.

Thanks,
Ranjani
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/soc-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 2536ba4..2347b58 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -354,6 +354,7 @@ static struct snd_soc_pcm_runtime
> *soc_new_pcm_runtime(
>  	if (!rtd)
>  		return NULL;
>  
> +	INIT_LIST_HEAD(&rtd->list);
>  	INIT_LIST_HEAD(&rtd->component_list);
>  	rtd->card = card;
>  	rtd->dai_link = dai_link;
Kuninori Morimoto Aug. 6, 2019, 6:29 a.m. UTC | #2
Hi Ranjani

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > No one initialize rtd->list, so far.
> > Let's do it.
> Morimoto-san,
> 
> I dont think this is needed. The rtd->list is not meant to be a list
> but rather just as a member of the card->rtd_list. So no need to
> initialize.

Thank you for your review !

I will wait other peoples review, and post v2 patch.

Thank you for your help !!
Best regards
---
Kuninori Morimoto

Patch
diff mbox series

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2536ba4..2347b58 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -354,6 +354,7 @@  static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
 	if (!rtd)
 		return NULL;
 
+	INIT_LIST_HEAD(&rtd->list);
 	INIT_LIST_HEAD(&rtd->component_list);
 	rtd->card = card;
 	rtd->dai_link = dai_link;