All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Dupuis, Chad" <chad.dupuis@cavium.com>
Cc: kbuild-all@01.org, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org, fcoe-devel@open-fcoe.org,
	netdev@vger.kernel.org, yuval.mintz@cavium.com,
	QLogic-Storage-Upstream@cavium.com
Subject: [PATCH] qedf: fix ifnullfree.cocci warnings
Date: Tue, 14 Feb 2017 10:13:08 +0800	[thread overview]
Message-ID: <20170214021308.GA24773@intel11.lkp.intel.com> (raw)
In-Reply-To: <1487013421-27006-3-git-send-email-chad.dupuis@cavium.com>

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(-)

--- 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);
 }
 
 /*

  reply	other threads:[~2017-02-14  2:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 19:16 [PATCH V4 0/2] Add QLogic FastLinQ FCoE (qedf) driver Dupuis, Chad
2017-02-13 19:16 ` Dupuis, Chad
2017-02-13 19:17 ` [PATCH V4 net-next 1/2] qed: Add support for hardware offloaded FCoE Dupuis, Chad
2017-02-13 19:17   ` Dupuis, Chad
2017-02-14 18:14   ` David Miller
2017-02-13 19:17 ` [PATCH V4 2/2] qedf: Add QLogic FastLinQ offload FCoE driver framework Dupuis, Chad
2017-02-13 19:17   ` Dupuis, Chad
2017-02-14  2:13   ` kbuild test robot [this message]
2017-02-14  2:13   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170214021308.GA24773@intel11.lkp.intel.com \
    --to=lkp@intel.com \
    --cc=QLogic-Storage-Upstream@cavium.com \
    --cc=chad.dupuis@cavium.com \
    --cc=fcoe-devel@open-fcoe.org \
    --cc=kbuild-all@01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=yuval.mintz@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.