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

Commit 1133be72 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Greg Kroah-Hartman
Browse files

scsi: fnic: Fix error return code in fnic_probe()

[ Upstream commit d4fc94fe65578738ded138e9fce043db6bfc3241 ]

Return a negative error code from the error handling case instead of 0 as
done elsewhere in this function.

Link: https://lore.kernel.org/r/1607068060-31203-1-git-send-email-zhangchangzhong@huawei.com


Fixes: 5df6d737 ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Reviewed-by: default avatarKaran Tilak Kumar <kartilak@cisco.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4cf97fe9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -735,6 +735,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	for (i = 0; i < FNIC_IO_LOCKS; i++)
		spin_lock_init(&fnic->io_req_lock[i]);

	err = -ENOMEM;
	fnic->io_req_pool = mempool_create_slab_pool(2, fnic_io_req_cache);
	if (!fnic->io_req_pool)
		goto err_out_free_resources;