cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER
authorNiklas Cassel <niklas.cassel@linaro.org>
Tue, 17 Jul 2018 20:48:21 +0000 (22:48 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Jul 2018 08:14:38 +0000 (10:14 +0200)
If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an
error message. Just be silent in this case.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/qcom-cpufreq-kryo.c

index 29389ac..b8d1e68 100644 (file)
@@ -109,8 +109,9 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
        speedbin_nvmem = of_nvmem_cell_get(np, NULL);
        of_node_put(np);
        if (IS_ERR(speedbin_nvmem)) {
-               dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
-                       PTR_ERR(speedbin_nvmem));
+               if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
+                       dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
+                               PTR_ERR(speedbin_nvmem));
                return PTR_ERR(speedbin_nvmem);
        }