Commit e89cabf2 authored by Wei Yongjun's avatar Wei Yongjun Committed by Martin K. Petersen

scsi: qedf: Fix error return code in __qedf_probe()

Fix to return error code -ENOMEM from the error handling case instead of
0, as done elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarChad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3f884a0a
...@@ -3126,6 +3126,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) ...@@ -3126,6 +3126,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
qedf->cmd_mgr = qedf_cmd_mgr_alloc(qedf); qedf->cmd_mgr = qedf_cmd_mgr_alloc(qedf);
if (!qedf->cmd_mgr) { if (!qedf->cmd_mgr) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to allocate cmd mgr.\n"); QEDF_ERR(&(qedf->dbg_ctx), "Failed to allocate cmd mgr.\n");
rc = -ENOMEM;
goto err5; goto err5;
} }
...@@ -3149,6 +3150,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) ...@@ -3149,6 +3150,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
create_workqueue(host_buf); create_workqueue(host_buf);
if (!qedf->ll2_recv_wq) { if (!qedf->ll2_recv_wq) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to LL2 workqueue.\n"); QEDF_ERR(&(qedf->dbg_ctx), "Failed to LL2 workqueue.\n");
rc = -ENOMEM;
goto err7; goto err7;
} }
...@@ -3192,6 +3194,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) ...@@ -3192,6 +3194,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
if (!qedf->timer_work_queue) { if (!qedf->timer_work_queue) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to start timer " QEDF_ERR(&(qedf->dbg_ctx), "Failed to start timer "
"workqueue.\n"); "workqueue.\n");
rc = -ENOMEM;
goto err7; goto err7;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment