2013-06-21 02:46:41

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] rsxx: fix error return code in rsxx_pci_probe()

From: Wei Yongjun <[email protected]>

Fix to return -ENOMEM in the create_singlethread_workqueue() error handling
case instead of 0, as done elsewhere in this function.

Introduced by commit a3299ab18591d36ad5622f5064619123c439b779.
(rsxx: Individual workqueues for interruptible events.)

Signed-off-by: Wei Yongjun <[email protected]>
---
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 6e85e21..11eb897 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -946,6 +946,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;
}


2013-06-21 14:06:50

by Philip J. Kelleher

[permalink] [raw]
Subject: Re: [PATCH -next] rsxx: fix error return code in rsxx_pci_probe()

On Fri, Jun 21, 2013 at 10:46:38AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return -ENOMEM in the create_singlethread_workqueue() error handling
> case instead of 0, as done elsewhere in this function.
>
> Introduced by commit a3299ab18591d36ad5622f5064619123c439b779.
> (rsxx: Individual workqueues for interruptible events.)
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> 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 6e85e21..11eb897 100644
> --- a/drivers/block/rsxx/core.c
> +++ b/drivers/block/rsxx/core.c
> @@ -946,6 +946,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;
> }

Thank You for fixing that.

>
>