powerpc/4xx: Fix error return code in ppc4xx_msi_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 26 Mar 2018 14:43:09 +0000 (14:43 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Mar 2018 13:10:34 +0000 (00:10 +1100)
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
[mpe: Add missing ';' to make it compile]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/4xx/msi.c

index 4b859c840ea9a8dcf75feee432b857c9b62f0fdc..96aaae67892802d9153d3f603c67437d5fe802eb 100644 (file)
@@ -241,7 +241,8 @@ static int ppc4xx_msi_probe(struct platform_device *dev)
        if (!msi_irqs)
                return -ENODEV;
 
-       if (ppc4xx_setup_pcieh_hw(dev, res, msi))
+       err = ppc4xx_setup_pcieh_hw(dev, res, msi);
+       if (err)
                goto error_out;
 
        err = ppc4xx_msi_init_allocator(dev, msi);