From: Dan Carpenter Date: Thu, 4 Aug 2016 22:31:52 +0000 (-0700) Subject: powerpc/fsl_rio: fix a missing error code X-Git-Tag: v4.14-rc1~2709^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=380afa3698781e19699d2585b655e699b2da0fa0;p=platform%2Fkernel%2Flinux-rpi.git powerpc/fsl_rio: fix a missing error code We should set the error code here rather than incorrectly returning 0. Otherwise static checkers complain. Link: http://lkml.kernel.org/r/20160804053525.GM775@mwanda Signed-off-by: Dan Carpenter Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 984e816..68e7c0d 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -491,6 +491,7 @@ int fsl_rio_setup(struct platform_device *dev) rmu_node = of_parse_phandle(dev->dev.of_node, "fsl,srio-rmu-handle", 0); if (!rmu_node) { dev_err(&dev->dev, "No valid fsl,srio-rmu-handle property\n"); + rc = -ENOENT; goto err_rmu; } rc = of_address_to_resource(rmu_node, 0, &rmu_regs);