mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings
@ 2019-05-30 23:06 Julia Lawall
  2019-06-03 17:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2019-05-30 23:06 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-kernel, kbuild-all

From: kbuild test robot <lkp@intel.com>

sound/soc/soc-core.c:391:2-7: WARNING: NULL check before some freeing functions is not needed.

 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: 8e144273005d ("ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init()")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://github.com/morimoto/linux fw-cleanup-2019-05-30-v3
head:   7f2c61a9097fcf25dac44865db31e7eab5c8fc9d
commit: 8e144273005d3caf8b9978e407e3d00b6180dd49 [96/103] ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init()
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago

Please take the patch only if it's a positive warning. Thanks!

 soc-core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -387,8 +387,7 @@ static void soc_free_pcm_runtime(struct

 	snd_soc_rtdcom_del_all(rtd);

-	if (rtd->codec_dais)
-		kfree(rtd->codec_dais);
+	kfree(rtd->codec_dais);

 	list_del(&rtd->list);
 	kfree(rtd);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings
  2019-05-30 23:06 [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings Julia Lawall
@ 2019-06-03 17:58 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-06-03 17:58 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Kuninori Morimoto, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-kernel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

On Thu, May 30, 2019 at 07:06:11PM -0400, Julia Lawall wrote:
> From: kbuild test robot <lkp@intel.com>
> 
> sound/soc/soc-core.c:391:2-7: WARNING: NULL check before some freeing functions is not needed.
> 
>  NULL check before some freeing functions is not needed.

This doesn't apply against current code, please check and resend.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-03 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 23:06 [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings Julia Lawall
2019-06-03 17:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®