aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2018-03-14 15:56:39 -0400
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-03-18 18:43:46 -0400
commit99a31adfb2ffbdc6a5cdcec4e119830cf4c19352 (patch)
tree7d0f957bfd636c20dc280da5e45b22fdabf753b4
parent96a30d7f919f6786d8592599836d94018f9004c4 (diff)
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r--drivers/remoteproc/imx_rproc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 6d02ef62a626..54c07fd3f204 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -333,10 +333,8 @@ static int imx_rproc_probe(struct platform_device *pdev)
333 /* set some other name then imx */ 333 /* set some other name then imx */
334 rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, 334 rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops,
335 NULL, sizeof(*priv)); 335 NULL, sizeof(*priv));
336 if (!rproc) { 336 if (!rproc)
337 ret = -ENOMEM; 337 return -ENOMEM;
338 goto err;
339 }
340 338
341 dcfg = of_device_get_match_data(dev); 339 dcfg = of_device_get_match_data(dev);
342 if (!dcfg) { 340 if (!dcfg) {
@@ -381,13 +379,13 @@ static int imx_rproc_probe(struct platform_device *pdev)
381 goto err_put_clk; 379 goto err_put_clk;
382 } 380 }
383 381
384 return ret; 382 return 0;
385 383
386err_put_clk: 384err_put_clk:
387 clk_disable_unprepare(priv->clk); 385 clk_disable_unprepare(priv->clk);
388err_put_rproc: 386err_put_rproc:
389 rproc_free(rproc); 387 rproc_free(rproc);
390err: 388
391 return ret; 389 return ret;
392} 390}
393 391