CC: [email protected]
TO: Jiri Slaby <[email protected]>
CC: Johannes Berg <[email protected]>
CC: Emmanuel Grumbach <[email protected]>
CC: Luca Coelho <[email protected]>
CC: Intel Linux Wireless <[email protected]>
CC: Kalle Valo <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]

From: kernel test robot <[email protected]>

drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c:300: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: 66a92bffe4db ("iwl: crash fix")
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git 
devel
head:   b1d08004826c99d8af2be6744a7c623a18965562
commit: 66a92bffe4dbda1dbc55f5f9f6124426e3bed211 [34/60] iwl: crash fix
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

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

 iwl-dbg-tlv.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -296,8 +296,7 @@ static int iwl_dbg_tlv_alloc_trigger(str
        }
 
        ret = iwl_dbg_tlv_add(tlv, &trans->dbg.time_point[tp].trig_list);
-       if (dup)
-               kfree(dup);
+       kfree(dup);
 
        return ret;
 }
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to