Do not print errors of getting clocks and regulators in probe twice:
once in q6v5_init_clocks() or q6v5_regulator_init() and then again in the
probe function.  This also avoids dmesg flood on deferred probe.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlow...@linaro.org>
---
 drivers/remoteproc/qcom_q6v5_mss.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c 
b/drivers/remoteproc/qcom_q6v5_mss.c
index 
92212892a53ea4843da62642c39413c33b4c962a..68b8172b023ee62be764ba69e07f3743ce6124e3
 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -2020,42 +2020,32 @@ static int q6v5_probe(struct platform_device *pdev)
 
        ret = q6v5_init_clocks(&pdev->dev, qproc->proxy_clks,
                               desc->proxy_clk_names);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to get proxy clocks.\n");
+       if (ret < 0)
                return ret;
-       }
        qproc->proxy_clk_count = ret;
 
        ret = q6v5_init_clocks(&pdev->dev, qproc->reset_clks,
                               desc->reset_clk_names);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to get reset clocks.\n");
+       if (ret < 0)
                return ret;
-       }
        qproc->reset_clk_count = ret;
 
        ret = q6v5_init_clocks(&pdev->dev, qproc->active_clks,
                               desc->active_clk_names);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to get active clocks.\n");
+       if (ret < 0)
                return ret;
-       }
        qproc->active_clk_count = ret;
 
        ret = q6v5_regulator_init(&pdev->dev, qproc->proxy_regs,
                                  desc->proxy_supply);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to get proxy regulators.\n");
+       if (ret < 0)
                return ret;
-       }
        qproc->proxy_reg_count = ret;
 
        ret = q6v5_regulator_init(&pdev->dev,  qproc->active_regs,
                                  desc->active_supply);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to get active regulators.\n");
+       if (ret < 0)
                return ret;
-       }
        qproc->active_reg_count = ret;
 
        ret = q6v5_pds_attach(&pdev->dev, qproc->proxy_pds,
@@ -2065,10 +2055,8 @@ static int q6v5_probe(struct platform_device *pdev)
                ret = q6v5_regulator_init(&pdev->dev,
                                          qproc->fallback_proxy_regs,
                                          desc->fallback_proxy_supply);
-               if (ret < 0) {
-                       dev_err(&pdev->dev, "Failed to get fallback proxy 
regulators.\n");
+               if (ret < 0)
                        return ret;
-               }
                qproc->fallback_proxy_reg_count = ret;
        } else if (ret < 0) {
                dev_err(&pdev->dev, "Failed to init power domains\n");

-- 
2.43.0


Reply via email to