aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-11-04 05:37:17 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-12 06:05:25 -0500
commitb6829c72dff7359039718d2a465133691c9bb5b4 (patch)
tree44487cec9320c4ca04ab5689d2fe9c77a1a0ac5e /drivers/scsi/bnx2fc/bnx2fc_fcoe.c
parent7dad6b2e440d810273946b0e7092a8fe043c3b8a (diff)
bnx2fc: check IS_ERR() instead of NULL
The bnx2fc_if_create() function returns NULL on failure, it never returns an error pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index cd2e61025926..b0d7256997ac 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)
1081 mutex_unlock(&bnx2fc_dev_lock); 1081 mutex_unlock(&bnx2fc_dev_lock);
1082 rtnl_unlock(); 1082 rtnl_unlock();
1083 1083
1084 if (IS_ERR(vn_port)) { 1084 if (!vn_port) {
1085 printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n", 1085 printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n",
1086 netdev->name); 1086 netdev->name);
1087 return -EIO; 1087 return -EIO;