* [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()
@ 2018-01-17 12:42 Wei Yongjun
2018-01-17 14:40 ` Chad Dupuis
2018-01-18 2:44 ` Martin K. Petersen
0 siblings, 2 replies; 5+ messages in thread
From: Wei Yongjun @ 2018-01-17 12:42 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: Wei Yongjun, QLogic-Storage-Upstream, linux-scsi, kernel-janitors
Fix to return error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/scsi/qedf/qedf_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 40800dd..ccd9a08 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -3126,6 +3126,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
qedf->cmd_mgr = qedf_cmd_mgr_alloc(qedf);
if (!qedf->cmd_mgr) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to allocate cmd mgr.\n");
+ rc = -ENOMEM;
goto err5;
}
@@ -3149,6 +3150,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
create_workqueue(host_buf);
if (!qedf->ll2_recv_wq) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to LL2 workqueue.\n");
+ rc = -ENOMEM;
goto err7;
}
@@ -3192,6 +3194,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
if (!qedf->timer_work_queue) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to start timer "
"workqueue.\n");
+ rc = -ENOMEM;
goto err7;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()
2018-01-17 12:42 [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe() Wei Yongjun
@ 2018-01-17 14:40 ` Chad Dupuis
2018-01-18 2:44 ` Martin K. Petersen
1 sibling, 0 replies; 5+ messages in thread
From: Chad Dupuis @ 2018-01-17 14:40 UTC (permalink / raw)
To: Wei Yongjun
Cc: James E.J. Bottomley, Martin K. Petersen,
QLogic-Storage-Upstream, linux-scsi, kernel-janitors
On Wed, 17 Jan 2018, 7:42am, Wei Yongjun wrote:
> Fix to return error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/scsi/qedf/qedf_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Yeah, we should be returning -ENOMEM in those cases.
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()
@ 2018-01-17 14:40 ` Chad Dupuis
0 siblings, 0 replies; 5+ messages in thread
From: Chad Dupuis @ 2018-01-17 14:40 UTC (permalink / raw)
To: Wei Yongjun
Cc: James E.J. Bottomley, Martin K. Petersen,
QLogic-Storage-Upstream, linux-scsi, kernel-janitors
On Wed, 17 Jan 2018, 7:42am, Wei Yongjun wrote:
> Fix to return error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/scsi/qedf/qedf_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Yeah, we should be returning -ENOMEM in those cases.
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()
2018-01-17 12:42 [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe() Wei Yongjun
@ 2018-01-18 2:44 ` Martin K. Petersen
2018-01-18 2:44 ` Martin K. Petersen
1 sibling, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2018-01-18 2:44 UTC (permalink / raw)
To: Wei Yongjun
Cc: James E.J. Bottomley, Martin K. Petersen,
QLogic-Storage-Upstream, linux-scsi, kernel-janitors
Wei,
> Fix to return error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
Applied to 4.16/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()
@ 2018-01-18 2:44 ` Martin K. Petersen
0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2018-01-18 2:44 UTC (permalink / raw)
To: Wei Yongjun
Cc: James E.J. Bottomley, Martin K. Petersen,
QLogic-Storage-Upstream, linux-scsi, kernel-janitors
Wei,
> Fix to return error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
Applied to 4.16/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-18 2:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 12:42 [PATCH -next] scsi: qedf: Fix error return code in __qedf_probe() Wei Yongjun
2018-01-17 14:40 ` Chad Dupuis
2018-01-17 14:40 ` Chad Dupuis
2018-01-18 2:44 ` Martin K. Petersen
2018-01-18 2:44 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.