thermal/drivers/sun8i: Remove redundant msg in sun8i_ths_register()
authorYangtao Li <frank.li@vivo.com>
Tue, 20 Jun 2023 09:07:23 +0000 (17:07 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 26 Jun 2023 10:03:14 +0000 (12:03 +0200)
The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230620090732.50025-2-frank.li@vivo.com
drivers/thermal/sun8i_thermal.c

index d4d241686c8103d06f50076766c302a617c96fd4..195f3c5d0b388c9ffc812415ba0608ee038d83c9 100644 (file)
@@ -468,9 +468,7 @@ static int sun8i_ths_register(struct ths_device *tmdev)
                if (IS_ERR(tmdev->sensor[i].tzd))
                        return PTR_ERR(tmdev->sensor[i].tzd);
 
-               if (devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd))
-                       dev_warn(tmdev->dev,
-                                "Failed to add hwmon sysfs attributes\n");
+               devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd);
        }
 
        return 0;