[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170214021308.GA24773@intel11.lkp.intel.com>
Date: Tue, 14 Feb 2017 10:13:08 +0800
From: kbuild test robot <lkp@...el.com>
To: "Dupuis, Chad" <chad.dupuis@...ium.com>
Cc: kbuild-all@...org, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, fcoe-devel@...n-fcoe.org,
netdev@...r.kernel.org, yuval.mintz@...ium.com,
QLogic-Storage-Upstream@...ium.com
Subject: [PATCH] qedf: fix ifnullfree.cocci warnings
drivers/scsi/qedf/qedf_main.c:2742: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
CC: Dupuis, Chad <chad.dupuis@...ium.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
qedf_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2738,8 +2738,7 @@ static void qedf_free_fcoe_pf_param(stru
qedf_free_global_queues(qedf);
- if (qedf->global_queues)
- kfree(qedf->global_queues);
+ kfree(qedf->global_queues);
}
/*
Powered by blists - more mailing lists