提交 db1721f5 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: soc-core: remove rtd NULL check on soc_free_pcm_runtime()

static soc_free_pcm_runtime() is never called with rtd == NULL.
This patch removes unnecessary rtd == NULL check from
soc_free_pcm_runtime().

Furthermore, NULL check before kfree() is not needed.
This patch removes such ckeck too.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 957ce0c6
......@@ -639,8 +639,7 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
{
if (rtd && rtd->codec_dais)
kfree(rtd->codec_dais);
kfree(rtd->codec_dais);
snd_soc_rtdcom_del_all(rtd);
kfree(rtd);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册