Message ID | 20230803012341.2388831-1-chenjiahao16@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Daniel Lezcano |
Headers | show |
Series | [-next] thermal/drivers/mediatek: Remove repeating warn msg after devm_thermal_add_hwmon_sysfs() | expand |
On Thu, Aug 3, 2023 at 9:24 AM Chen Jiahao <chenjiahao16@huawei.com> wrote: > > 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@huawei.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
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; }
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@huawei.com> --- drivers/thermal/mediatek/auxadc_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)