[PATCH 07/12] thermal: qcom: Remove redundant error log prints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



devm_thermal_of_zone_register() prints error log messages when
it fails, so there is no need to print error log messages again.

Signed-off-by: Xichao Zhao <zhao.xichao@xxxxxxxx>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c    | 7 +------
 drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 3 +--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index d7f2e6ca92c2..0ab14153e74d 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -677,14 +677,9 @@ static int adc_tm5_register_tzd(struct adc_tm5_chip *adc_tm)
 						    &adc_tm->channels[i],
 						    &adc_tm5_thermal_ops);
 		if (IS_ERR(tzd)) {
-			if (PTR_ERR(tzd) == -ENODEV) {
-				dev_dbg(adc_tm->dev, "thermal sensor on channel %d is not used\n",
-					 adc_tm->channels[i].channel);
+			if (PTR_ERR(tzd) == -ENODEV)
 				continue;
-			}
 
-			dev_err(adc_tm->dev, "Error registering TZ zone for channel %d: %ld\n",
-				adc_tm->channels[i].channel, PTR_ERR(tzd));
 			return PTR_ERR(tzd);
 		}
 		adc_tm->channels[i].tzd = tzd;
diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
index f39ca0ddd17b..96f254f8816e 100644
--- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
@@ -867,8 +867,7 @@ static int qpnp_tm_probe(struct platform_device *pdev)
 	chip->tz_dev = devm_thermal_of_zone_register(
 		&pdev->dev, 0, chip, chip->data->ops);
 	if (IS_ERR(chip->tz_dev))
-		return dev_err_probe(&pdev->dev, PTR_ERR(chip->tz_dev),
-				     "failed to register sensor\n");
+		return PTR_ERR(chip->tz_dev);
 
 	ret = qpnp_tm_init(chip);
 	if (ret < 0)
-- 
2.34.1





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux