powerpc/fsl_msi: return proper error value when ioremap failed.
authorLiu Shuo <soniccat.liu@gmail.com>
Thu, 8 Mar 2012 22:47:37 +0000 (14:47 -0800)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 16 Mar 2012 15:46:31 +0000 (10:46 -0500)
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>
arch/powerpc/sysdev/fsl_msi.c

index ecb5c1946d22cd01e05db0ef9369431869ec2ee6..0bab15626ee26e6e58290c9b092f2c341ac0f983 100644 (file)
@@ -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;