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>
This commit is contained in:
Fabio Estevam 2018-02-23 22:42:04 -03:00 committed by Shawn Guo
parent 9b454d16e5
commit 258172f96f

View file

@ -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;
}