]> git.karo-electronics.de Git - linux-beck.git/commitdiff
thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case
authorEduardo Valentin <edubezval@gmail.com>
Fri, 12 Dec 2014 14:05:39 +0000 (10:05 -0400)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 12 Dec 2014 14:08:31 +0000 (10:08 -0400)
Avoid printing the error message in the EPROBE_DEFER case
where registering cpu cooling at ti-soc-thermal thermal driver.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/ti-soc-thermal/ti-thermal-common.c

index 5f07d7e3a19835e076b5e3210a001ffd4110d892..096fb2141b2879ffa72f08387181e6ca5006aa22 100644 (file)
@@ -405,9 +405,14 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
        /* Register cooling device */
        data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
        if (IS_ERR(data->cool_dev)) {
-               dev_err(bgp->dev,
-                       "Failed to register cpufreq cooling device\n");
-               return PTR_ERR(data->cool_dev);
+               int ret = PTR_ERR(data->cool_dev);
+
+               if (ret != -EPROBE_DEFER)
+                       dev_err(bgp->dev,
+                               "Failed to register cpu cooling device %d\n",
+                               ret);
+
+               return ret;
        }
        ti_bandgap_set_sensor_data(bgp, id, data);