Commit 258172f9 authored by Fabio Estevam's avatar Fabio Estevam Committed by Shawn Guo

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: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 9b454d16
...@@ -428,10 +428,8 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base, ...@@ -428,10 +428,8 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base,
int ret = 0; int ret = 0;
node = of_find_compatible_node(NULL, NULL, compat); node = of_find_compatible_node(NULL, NULL, compat);
if (!node) { if (!node)
ret = -ENODEV; return -ENODEV;
goto out;
}
ret = of_address_to_resource(node, 0, &res); ret = of_address_to_resource(node, 0, &res);
if (ret) if (ret)
...@@ -444,7 +442,6 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base, ...@@ -444,7 +442,6 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base,
put_node: put_node:
of_node_put(node); of_node_put(node);
out:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment