11 Sep
2019
11 Sep
'19
1:54 a.m.
Hi Sridharan
Thank you for your review
--- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -370,11 +370,8 @@ static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd) if (!rtd) return; - kfree(rtd->codec_dais); - if (rtd->dev) - device_unregister(rtd->dev); /* soc_release_rtd_dev */ list_del(&rtd->list); - kfree(rtd);
Morimoto-san,
Just curious, why did you remove the check for if(rtd->dev) here before calling device_unregister()?
Thanks, Ranjani
+ device_unregister(rtd->dev); /* soc_release_rtd_dev */ }
Can you check [07/13] patch ? It allocs rtd->dev (as dev) first, and allocs rtd next. This means, if it has rtd, it has rtd->dev.
Here, this function checks rtd pointer. If rtd is not NULL, rtd->dev is also not NULL.
But, indeed it is a littile bit tricky ? Some comment is needed.
Thank you for your help !! Best regards --- Kuninori Morimoto