From: Dan Carpenter Date: Tue, 4 Nov 2014 10:37:17 +0000 (+0300) Subject: bnx2fc: check IS_ERR() instead of NULL X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b6829c72dff7359039718d2a465133691c9bb5b4;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Chad Dupuis Signed-off-by: Christoph Hellwig --- 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) 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;