remoteproc: qcom_wcnss_iris: 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-10-5abb4fc61eca@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2024-10-11 15:09:18 +02:00 committed by Bjorn Andersson
parent f21e504de8
commit 70d3581953

View File

@ -155,9 +155,8 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo)
iris->xo_clk = devm_clk_get(&iris->dev, "xo");
if (IS_ERR(iris->xo_clk)) {
ret = PTR_ERR(iris->xo_clk);
if (ret != -EPROBE_DEFER)
dev_err(&iris->dev, "failed to acquire xo clk\n");
ret = dev_err_probe(&iris->dev, PTR_ERR(iris->xo_clk),
"failed to acquire xo clk\n");
goto err_device_del;
}