Skip to content

Commit

Permalink
bnx2fc: check IS_ERR() instead of NULL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Christoph Hellwig committed Nov 12, 2014
1 parent 7dad6b2 commit b6829c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6829c7

Please sign in to comment.