From: kbuild test robot <lkp@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>,
Linux-ALSA <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>,
kbuild-all@01.org, Dan Carpenter <dan.carpenter@oracle.com>
Subject: [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings
Date: Thu, 14 Sep 2017 09:08:01 +0800 [thread overview]
Message-ID: <20170914010801.GA116841@lkp-g5.lkp.intel.com> (raw)
In-Reply-To: <87a821lk11.wl%kuninori.morimoto.gx@renesas.com>
sound/soc/soc-core.c:643:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: 7e74acb4fc31 ("ASoC: soc-core: remove rtd NULL check from soc_free_pcm_runtime()")
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
soc-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -639,8 +639,7 @@ static struct snd_soc_pcm_runtime *soc_n
static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
{
- if (rtd->codec_dais)
- kfree(rtd->codec_dais);
+ kfree(rtd->codec_dais);
snd_soc_rtdcom_del_all(rtd);
kfree(rtd);
}
next prev parent reply other threads:[~2017-09-14 1:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 7:44 [bug report] ASoC: soc-core: add snd_soc_rtdcom_xxx() Dan Carpenter
2017-09-11 8:22 ` Kuninori Morimoto
2017-09-11 8:32 ` [PATCH] ASoC: soc-core: remove rtd NULL check from soc_free_pcm_runtime() Kuninori Morimoto
2017-09-14 1:08 ` kbuild test robot
2017-09-14 1:08 ` kbuild test robot [this message]
2017-09-14 1:17 ` [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings Kuninori Morimoto
-- strict thread matches above, loose matches on Subject: below --
2019-05-30 23:06 Julia Lawall
2019-06-03 17:58 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170914010801.GA116841@lkp-g5.lkp.intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=horms@verge.net.au \
--cc=kbuild-all@01.org \
--cc=kuninori.morimoto.gx@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).