Message ID | 20170214021308.GA24773@intel11.lkp.intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
--- 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); } /*
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@cavium.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- qedf_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)