projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b454d1
)
ARM: imx: pm-imx6: Return the error directly
author
Fabio Estevam
<fabio.estevam@nxp.com>
Sat, 24 Feb 2018 01:42:04 +0000
(22:42 -0300)
committer
Shawn Guo
<shawnguo@kernel.org>
Wed, 28 Feb 2018 03:04:21 +0000
(11:04 +0800)
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>
arch/arm/mach-imx/pm-imx6.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-imx/pm-imx6.c
b/arch/arm/mach-imx/pm-imx6.c
index ecdf071653d4dc6c5f9845f4b39dc72b84dd027a..017539dd712bc04c94feff14fef8960c1f9933b8 100644
(file)
--- 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;
}