powerpc/fsl_rio: fix a missing error code
PATCH 4/7 powerpc/fsl_rio: fix a missing error code
From: Dan Carpenter <[email protected]>
Subject: powerpc/fsl_rio: fix a missing error code
We should set the error code here rather than incorrectly returning 0. Otherwise static checkers complain.
Signed-off-by Dan Carpenter <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Alexandre Bounine <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/powerpc/sysdev/fsl_rio.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/sysdev/fsl_rio.c renamed from arch/powerpc/sysdev/fsl_rio.c~powerpc-fsl_rio-fix-a-missing-error-code +1 -0
@@ -491,6 +491,7 @@ int fsl_rio_setup(struct platform_device 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);
_