summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-09-25 04:38:13 +0300
committerMark Brown <broonie@kernel.org>2017-09-25 19:30:48 +0300
commitdb1721f5296704d4f706a31f5d147cf7f16e3add (patch)
tree80ef6e5f2fabac80f6642b80eb2c74903e1d5c87
parent957ce0c6b8a1f26559864507ae0bfcba29d924ad (diff)
downloadlinux-db1721f5296704d4f706a31f5d147cf7f16e3add.tar.xz
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fee4b0ef5566..091ebe198194 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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);
}