All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe()
@ 2016-09-10 16:06 Wei Yongjun
  2016-09-14 18:27 ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2016-09-10 16:06 UTC (permalink / raw)
  To: Sathya Prakash, Chaitra P B, Suganath Prabu Subramani
  Cc: Wei Yongjun, MPT-FusionLinux.pdl, linux-scsi

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return error code -ENOMEM from the workqueue alloc error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/message/fusion/mptfc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 129e132..add6a3a 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -1326,8 +1326,10 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	ioc->fc_rescan_work_q =
 		alloc_ordered_workqueue(ioc->fc_rescan_work_q_name,
 					WQ_MEM_RECLAIM);
-	if (!ioc->fc_rescan_work_q)
+	if (!ioc->fc_rescan_work_q) {
+		error = -ENOMEM;
 		goto out_mptfc_probe;
+	}
 
 	/*
 	 *  Pre-fetch FC port WWN and stuff...


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe()
  2016-09-10 16:06 [PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe() Wei Yongjun
@ 2016-09-14 18:27 ` Martin K. Petersen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-09-14 18:27 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Sathya Prakash, Chaitra P B, Suganath Prabu Subramani,
	Wei Yongjun, MPT-FusionLinux.pdl, linux-scsi

>>>>> "Wei" == Wei Yongjun <weiyj.lk@gmail.com> writes:

Wei> Fix to return error code -ENOMEM from the workqueue alloc error
Wei> handling case instead of 0, as done elsewhere in this function.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe()
@ 2013-04-14  1:47 Wei Yongjun
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-04-14  1:47 UTC (permalink / raw)
  To: Nagalakshmi.Nandigama, Sreekanth.Reddy
  Cc: yongjun_wei, support, DL-MPTFusionLinux, linux-scsi

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/message/fusion/mptfc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index fd75108..b1b3ea3 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -1328,8 +1328,10 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		 "mptfc_wq_%d", sh->host_no);
 	ioc->fc_rescan_work_q =
 		create_singlethread_workqueue(ioc->fc_rescan_work_q_name);
-	if (!ioc->fc_rescan_work_q)
+	if (!ioc->fc_rescan_work_q) {
+		error = -ENOMEM;
 		goto out_mptfc_probe;
+	}
 
 	/*
 	 *  Pre-fetch FC port WWN and stuff...


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-14 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 16:06 [PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe() Wei Yongjun
2016-09-14 18:27 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2013-04-14  1:47 Wei Yongjun

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.