Skip to content

Commit

Permalink
drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER
Browse files Browse the repository at this point in the history
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: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Amit Kucheria authored and Eduardo Valentin committed May 14, 2019
1 parent 52eafd6 commit fc7d18c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/thermal/qcom/tsens.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ static int tsens_probe(struct platform_device *pdev)
if (priv->ops->calibrate) {
ret = priv->ops->calibrate(priv);
if (ret < 0) {
dev_err(dev, "tsens calibration failed\n");
if (ret != -EPROBE_DEFER)
dev_err(dev, "tsens calibration failed\n");
return ret;
}
}
Expand Down

0 comments on commit fc7d18c

Please sign in to comment.