public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
@ 2022-11-02 15:26 Johan Hovold
  2022-11-02 16:10 ` Andrew Halaney
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johan Hovold @ 2022-11-02 15:26 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki,
	Daniel Lezcano, Zhang Rui, linux-pm, linux-arm-msm, linux-kernel,
	Johan Hovold

Drivers should not be logging errors on probe deferral. Switch to using
dev_err_probe() to log failures when parsing the devicetree to avoid
errors like:

	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517

when a channel is not yet available.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index a3310bf061cb..c70615d2d771 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 		return irq;
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
-	if (ret) {
-		dev_err(dev, "get dt data failed: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "get dt data failed\n");
 
 	ret = adc_tm->data->init(adc_tm);
 	if (ret) {
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-04 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
2022-11-02 16:10 ` Andrew Halaney
2022-11-02 16:23 ` Manivannan Sadhasivam
2022-11-30  6:58 ` Johan Hovold
2022-12-04 16:35 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox