Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6829c72 authored by Dan Carpenter's avatar Dan Carpenter Committed by Christoph Hellwig
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 7dad6b2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;