* [PATCH -next] mtip32xx: fix error return code in mtip_pci_probe()
@ 2013-03-20 12:20 Wei Yongjun
2013-03-22 14:58 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-03-20 12:20 UTC (permalink / raw)
To: axboe, asamymuthupa, smani, sbradshaw; +Cc: yongjun_wei, linux-kernel
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/block/mtip32xx/mtip32xx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index b84dda5..044c781 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -4234,6 +4234,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
dd->isr_workq = create_workqueue(dd->workq_name);
if (!dd->isr_workq) {
dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance);
+ rv = -ENOMEM;
goto block_initialize_err;
}
@@ -4292,7 +4293,8 @@ static int mtip_pci_probe(struct pci_dev *pdev,
INIT_WORK(&dd->work[7].work, mtip_workq_sdbf7);
pci_set_master(pdev);
- if (pci_enable_msi(pdev)) {
+ rv = pci_enable_msi(pdev);
+ if (rv) {
dev_warn(&pdev->dev,
"Unable to enable MSI interrupt.\n");
goto block_initialize_err;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mtip32xx: fix error return code in mtip_pci_probe()
2013-03-20 12:20 [PATCH -next] mtip32xx: fix error return code in mtip_pci_probe() Wei Yongjun
@ 2013-03-22 14:58 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2013-03-22 14:58 UTC (permalink / raw)
To: Wei Yongjun; +Cc: asamymuthupa, smani, sbradshaw, yongjun_wei, linux-kernel
On Wed, Mar 20 2013, Wei Yongjun wrote:
> 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.
Good catch, applied!
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-22 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 12:20 [PATCH -next] mtip32xx: fix error return code in mtip_pci_probe() Wei Yongjun
2013-03-22 14:58 ` Jens Axboe
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.