Commit d137c830 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jens Axboe

mtip32xx: fix error return code in mtip_pci_probe()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7fbaee72
...@@ -4224,6 +4224,7 @@ static int mtip_pci_probe(struct pci_dev *pdev, ...@@ -4224,6 +4224,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
dd->isr_workq = create_workqueue(dd->workq_name); dd->isr_workq = create_workqueue(dd->workq_name);
if (!dd->isr_workq) { if (!dd->isr_workq) {
dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance); dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance);
rv = -ENOMEM;
goto block_initialize_err; goto block_initialize_err;
} }
...@@ -4282,7 +4283,8 @@ static int mtip_pci_probe(struct pci_dev *pdev, ...@@ -4282,7 +4283,8 @@ static int mtip_pci_probe(struct pci_dev *pdev,
INIT_WORK(&dd->work[7].work, mtip_workq_sdbf7); INIT_WORK(&dd->work[7].work, mtip_workq_sdbf7);
pci_set_master(pdev); pci_set_master(pdev);
if (pci_enable_msi(pdev)) { rv = pci_enable_msi(pdev);
if (rv) {
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"Unable to enable MSI interrupt.\n"); "Unable to enable MSI interrupt.\n");
goto block_initialize_err; goto block_initialize_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment