ipr: Fix error return code in ipr_probe_ioa()
authorWei Yongjun <weiyj.lk@gmail.com>
Fri, 29 Jul 2016 16:00:45 +0000 (16:00 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 2 Aug 2016 05:19:18 +0000 (01:19 -0400)
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 <weiyj.lk@gmail.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ipr.c

index 95e4834c58ee8d983d0482a2a9188c97404b57b8..bf85974be8621e16a130ffd711e18697231da3da 100644 (file)
@@ -10219,6 +10219,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
 
                if (!ioa_cfg->reset_work_q) {
                        dev_err(&pdev->dev, "Couldn't register reset workqueue\n");
+                       rc = -ENOMEM;
                        goto out_free_irq;
                }
        } else