From: kbuild test robot <lkp(a)intel.com>
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 <yung-chuan.liao(a)linux.intel.com>
Signed-off-by: kbuild test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
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(-)
--- a/drivers/soundwire/intel_init.c
+++ b/drivers/soundwire/intel_init.c
@@ -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;