diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-10-11 15:09:13 +0200 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-11-16 04:31:47 +0100 |
commit | 85865e839049c5d443eef4279d711bc292bee84c (patch) | |
tree | f0c6f5388d08bf34d8c7de3107f1e013f3822439 /drivers | |
parent | remoteproc: qcom_q6v5_pas: disable auto boot for wpss (diff) | |
download | linux-85865e839049c5d443eef4279d711bc292bee84c.tar.xz linux-85865e839049c5d443eef4279d711bc292bee84c.zip |
remoteproc: qcom_q6v5_adsp: Simplify with dev_err_probe()
Use dev_err_probe() to make error and defer code handling simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241011-remote-proc-dev-err-probe-v1-5-5abb4fc61eca@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/qcom_q6v5_adsp.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 5aa11ca41c7d..94af77baa7a1 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -534,15 +534,11 @@ static const struct rproc_ops adsp_ops = { static int adsp_init_clock(struct qcom_adsp *adsp, const char **clk_ids) { int num_clks = 0; - int i, ret; + int i; adsp->xo = devm_clk_get(adsp->dev, "xo"); - if (IS_ERR(adsp->xo)) { - ret = PTR_ERR(adsp->xo); - if (ret != -EPROBE_DEFER) - dev_err(adsp->dev, "failed to get xo clock"); - return ret; - } + if (IS_ERR(adsp->xo)) + return dev_err_probe(adsp->dev, PTR_ERR(adsp->xo), "failed to get xo clock"); for (i = 0; clk_ids[i]; i++) num_clks++; @@ -708,10 +704,9 @@ static int adsp_probe(struct platform_device *pdev) return ret; ret = qcom_rproc_pds_attach(adsp, desc->pd_names, desc->num_pds); - if (ret < 0) { - dev_err(&pdev->dev, "Failed to attach proxy power domains\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, + "Failed to attach proxy power domains\n"); ret = adsp_init_reset(adsp); if (ret) |