From: Liu Shuo <soniccat.liu@gmail.com>
Date: Thu, 8 Mar 2012 22:47:37 +0000 (-0800)
Subject: powerpc/fsl_msi: return proper error value when ioremap failed.
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b53804c70258000026d0b68b86aaecd571f2ba8b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

powerpc/fsl_msi: return proper error value when ioremap failed.

Signed-off-by: Liu Shuo <soniccat.liu@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---

diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index ecb5c1946d22..0bab15626ee2 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -410,6 +410,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
 
 		msi->msi_regs = ioremap(res.start, resource_size(&res));
 		if (!msi->msi_regs) {
+			err = -ENOMEM;
 			dev_err(&dev->dev, "could not map node %s\n",
 				dev->dev.of_node->full_name);
 			goto error_out;