Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christophe JAILLET and committed by
Bjorn Andersson
99a31adf 96a30d7f

+4 -6
+4 -6
drivers/remoteproc/imx_rproc.c
··· 333 333 /* set some other name then imx */ 334 334 rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, 335 335 NULL, sizeof(*priv)); 336 - if (!rproc) { 337 - ret = -ENOMEM; 338 - goto err; 339 - } 336 + if (!rproc) 337 + return -ENOMEM; 340 338 341 339 dcfg = of_device_get_match_data(dev); 342 340 if (!dcfg) { ··· 379 381 goto err_put_clk; 380 382 } 381 383 382 - return ret; 384 + return 0; 383 385 384 386 err_put_clk: 385 387 clk_disable_unprepare(priv->clk); 386 388 err_put_rproc: 387 389 rproc_free(rproc); 388 - err: 390 + 389 391 return ret; 390 392 } 391 393