* [PATCH] ARM: imx: pm-imx6: Return the error directly
@ 2018-02-24 1:42 Fabio Estevam
2018-02-28 3:04 ` Shawn Guo
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2018-02-24 1:42 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@nxp.com>
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>
---
arch/arm/mach-imx/pm-imx6.c | 7 ++-----
1 file 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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: imx: pm-imx6: Return the error directly
2018-02-24 1:42 [PATCH] ARM: imx: pm-imx6: Return the error directly Fabio Estevam
@ 2018-02-28 3:04 ` Shawn Guo
0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2018-02-28 3:04 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 23, 2018 at 10:42:04PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-28 3:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-24 1:42 [PATCH] ARM: imx: pm-imx6: Return the error directly Fabio Estevam
2018-02-28 3:04 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).