public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] bnx2fc: check IS_ERR() instead of NULL
@ 2014-11-04 10:37 Dan Carpenter
  2014-11-05 20:47 ` Chad Dupuis
  2014-11-06 16:52 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-11-04 10:37 UTC (permalink / raw)
  To: QLogic-Storage-Upstream; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors

The bnx2fc_if_create() function returns NULL on failure, it never
returns an error pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 79e5c94..dfed4be 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1081,7 +1081,7 @@ static int bnx2fc_vport_create(struct fc_vport *vport, bool disabled)
 	mutex_unlock(&bnx2fc_dev_lock);
 	rtnl_unlock();
 
-	if (IS_ERR(vn_port)) {
+	if (!vn_port) {
 		printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n",
 			netdev->name);
 		return -EIO;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-06 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 10:37 [patch 1/2] bnx2fc: check IS_ERR() instead of NULL Dan Carpenter
2014-11-05 20:47 ` Chad Dupuis
2014-11-06 16:52 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox