linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rsxx: fix error return code in rsxx_pci_probe()
@ 2020-12-04  8:40 Zhang Changzhong
  0 siblings, 0 replies; only message in thread
From: Zhang Changzhong @ 2020-12-04  8:40 UTC (permalink / raw)
  To: Joshua Morris, Philip Kelleher, Jens Axboe, Philip J Kelleher
  Cc: Zhang Changzhong, linux-block, linux-kernel

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

Fixes: a3299ab18591 ("rsxx: Individual workqueues for interruptible events.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
 drivers/block/rsxx/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index 63f5498..d7e2416 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -869,6 +869,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
 	card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
 	if (!card->event_wq) {
 		dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
+		st = -ENOMEM;
 		goto failed_event_handler;
 	}
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-04  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04  8:40 [PATCH] rsxx: fix error return code in rsxx_pci_probe() Zhang Changzhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).