From b6829c72dff7359039718d2a465133691c9bb5b4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 4 Nov 2014 13:37:17 +0300 Subject: [PATCH] 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 --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1