mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 02:25:00 -05:00
remoteproc: imx_rproc: Re-use existing error handling path in 'imx_rproc_probe()'
Avoid some code ducplication and be more future-proof. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
de6f83f85b
commit
96a30d7f91
1 changed files with 3 additions and 4 deletions
|
@ -361,8 +361,8 @@ static int imx_rproc_probe(struct platform_device *pdev)
|
||||||
priv->clk = devm_clk_get(dev, NULL);
|
priv->clk = devm_clk_get(dev, NULL);
|
||||||
if (IS_ERR(priv->clk)) {
|
if (IS_ERR(priv->clk)) {
|
||||||
dev_err(dev, "Failed to get clock\n");
|
dev_err(dev, "Failed to get clock\n");
|
||||||
rproc_free(rproc);
|
ret = PTR_ERR(priv->clk);
|
||||||
return PTR_ERR(priv->clk);
|
goto err_put_rproc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -372,8 +372,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
|
||||||
ret = clk_prepare_enable(priv->clk);
|
ret = clk_prepare_enable(priv->clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&rproc->dev, "Failed to enable clock\n");
|
dev_err(&rproc->dev, "Failed to enable clock\n");
|
||||||
rproc_free(rproc);
|
goto err_put_rproc;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rproc_add(rproc);
|
ret = rproc_add(rproc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue