[PATCH -next] thermal/drivers/mediatek: Remove repeating warn msg after devm_thermal_add_hwmon_sysfs()

Chen Jiahao chenjiahao16 at huawei.com
Wed Aug 2 18:23:41 PDT 2023


Referring to commit 8416ecfb32923 ("thermal/hwmon: Add error
information printing for devm_thermal_add_hwmon_sysfs()"),
return value has already been checked if ret != 0 in
devm_thermal_add_hwmon_sysfs(). Error handling has also been
performed in this case, including print warning message for
debugging.

Removing dev_warn() following devm_thermal_add_hwmon_sysfs()
to clean up redundant warning message.

Signed-off-by: Chen Jiahao <chenjiahao16 at huawei.com>
---
 drivers/thermal/mediatek/auxadc_thermal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c
index c537aed71017..7f8450c66646 100644
--- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -1289,9 +1289,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 	if (IS_ERR(tzdev))
 		return PTR_ERR(tzdev);
 
-	ret = devm_thermal_add_hwmon_sysfs(&pdev->dev, tzdev);
-	if (ret)
-		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+	devm_thermal_add_hwmon_sysfs(&pdev->dev, tzdev);
 
 	return 0;
 }
-- 
2.34.1




More information about the linux-arm-kernel mailing list