aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <[email protected]>2022-11-02 16:26:30 +0100
committerDaniel Lezcano <[email protected]>2022-12-14 15:25:40 +0100
commit6f8941646234e2d6e589377aea0dd1ba52365623 (patch)
treece885963c19a7a6b413bf0ce54aa1ec69592430e
parentc464856e63a4c9631add6a27340bd94beb9eb27f (diff)
thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
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 <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
-rw-r--r--drivers/thermal/qcom/qcom-spmi-adc-tm5.c6
1 files 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 1b2c43eab27d..88462a4628fb 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -1030,10 +1030,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) {