Skip to contentSkip to conversation

Soundwire: intel_init: fix ifnullfree.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Jan 31, 2020 SoundWire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Soundwire: intel_init: fix ifnullfree.cocci warnings

From: kbuild test robot <[email protected]>

NULL check before kfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes 89a76a6409ca ("Soundwire: intel_init: add sdw adr info to sdw_intel_ctx")
CC Bard Liao <[email protected]>

---

tree:   https://github.com/thesofproject/linux sdw/master_framework
head:   9fd32a3b5f5cef8953999dc060d4193d96fce64a
commit: 89a76a6409cac50edbdce778418d6688ad06b63a [61/89] Soundwire: intel_init: add sdw adr info to sdw_intel_ctx

:::::: branch date: 31 hours ago
:::::: commit date: 2 weeks ago

 intel_init.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soundwire/intel_init.c +1 -2
@@ -80,8 +80,7 @@ static int sdw_intel_cleanup(struct sdw_
 
 	kfree(ctx->links);
 	ctx->links = NULL;
-	if (ctx->ids)
-		kfree(ctx->ids);
+	kfree(ctx->ids);
 	ctx->ids = NULL;
 
 	return 0;