thermal: imx: Do not print error message in the EPROBE_DEFER case
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 11 Dec 2014 21:11:40 +0000 (19:11 -0200)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 12 Dec 2014 13:53:46 +0000 (09:53 -0400)
During imx_thermal probe we have the following log:

[    1.514819] imx_thermal 2000000.aips-bus:tempmon: failed to register cpufreq cooling device: -517
[    1.515064] platform 2000000.aips-bus:tempmon: Driver imx_thermal requests probe deferral

Avoid printing the error message in the EPROBE_DEFER case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/imx_thermal.c

index d80e36e..f94062b 100644 (file)
@@ -513,8 +513,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
        data->cdev = cpufreq_cooling_register(cpu_present_mask);
        if (IS_ERR(data->cdev)) {
                ret = PTR_ERR(data->cdev);
-               dev_err(&pdev->dev,
-                       "failed to register cpufreq cooling device: %d\n", ret);
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
+                               "failed to register cpufreq cooling device: %d\n",
+                               ret);
                return ret;
        }