summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/pm-imx6.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2018-02-23 22:42:04 -0300
committerShawn Guo <shawnguo@kernel.org>2018-02-28 11:04:21 +0800
commit258172f96fcfa491c172312773ddd89d8504bc57 (patch)
treeffa2334637369a1ac90d8f2c3634b372f25d3042 /arch/arm/mach-imx/pm-imx6.c
parent9b454d16e57d7c80b11c555fe8f79ff695fe3feb (diff)
downloadop-kernel-dev-258172f96fcfa491c172312773ddd89d8504bc57.zip
op-kernel-dev-258172f96fcfa491c172312773ddd89d8504bc57.tar.gz
ARM: imx: pm-imx6: Return the error directly
Simplify the error path by returning the error code directly rather than jumping to a label. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/pm-imx6.c')
-rw-r--r--arch/arm/mach-imx/pm-imx6.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index ecdf071..017539d 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -428,10 +428,8 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base,
int ret = 0;
node = of_find_compatible_node(NULL, NULL, compat);
- if (!node) {
- ret = -ENODEV;
- goto out;
- }
+ if (!node)
+ return -ENODEV;
ret = of_address_to_resource(node, 0, &res);
if (ret)
@@ -444,7 +442,6 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base,
put_node:
of_node_put(node);
-out:
return ret;
}
OpenPOWER on IntegriCloud