Commit 99a31adf authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bjorn Andersson

remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()'

We can return directly at the beginning of the function and save the 'err'
label.
We can also explicitly return 0 when the probe succeed.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 96a30d7f
...@@ -333,10 +333,8 @@ static int imx_rproc_probe(struct platform_device *pdev) ...@@ -333,10 +333,8 @@ static int imx_rproc_probe(struct platform_device *pdev)
/* set some other name then imx */ /* set some other name then imx */
rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops,
NULL, sizeof(*priv)); NULL, sizeof(*priv));
if (!rproc) { if (!rproc)
ret = -ENOMEM; return -ENOMEM;
goto err;
}
dcfg = of_device_get_match_data(dev); dcfg = of_device_get_match_data(dev);
if (!dcfg) { if (!dcfg) {
...@@ -381,13 +379,13 @@ static int imx_rproc_probe(struct platform_device *pdev) ...@@ -381,13 +379,13 @@ static int imx_rproc_probe(struct platform_device *pdev)
goto err_put_clk; goto err_put_clk;
} }
return ret; return 0;
err_put_clk: err_put_clk:
clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk);
err_put_rproc: err_put_rproc:
rproc_free(rproc); rproc_free(rproc);
err:
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