Commit 54566819 authored by Amit Kucheria's avatar Amit Kucheria Committed by Greg Kroah-Hartman

drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER

[ Upstream commit fc7d18cf ]

We print a calibration failure message on -EPROBE_DEFER from
nvmem/qfprom as follows:
[    3.003090] qcom-tsens 4a9000.thermal-sensor: version: 1.4
[    3.005376] qcom-tsens 4a9000.thermal-sensor: tsens calibration failed
[    3.113248] qcom-tsens 4a9000.thermal-sensor: version: 1.4

This confuses people when, in fact, calibration succeeds later when
nvmem/qfprom device is available. Don't print this message on a
-EPROBE_DEFER.
Signed-off-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a7ada939
...@@ -160,7 +160,8 @@ static int tsens_probe(struct platform_device *pdev) ...@@ -160,7 +160,8 @@ static int tsens_probe(struct platform_device *pdev)
if (tmdev->ops->calibrate) { if (tmdev->ops->calibrate) {
ret = tmdev->ops->calibrate(tmdev); ret = tmdev->ops->calibrate(tmdev);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "tsens calibration failed\n"); if (ret != -EPROBE_DEFER)
dev_err(dev, "tsens calibration failed\n");
return ret; return ret;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment