]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_pr...
authorYangtao Li <frank.li@vivo.com>
Tue, 20 Jun 2023 09:07:25 +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>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230620090732.50025-4-frank.li@vivo.com
drivers/thermal/imx8mm_thermal.c
drivers/thermal/imx_sc_thermal.c

index d8005e9ec992bd96154144331a801922fc71016e..d4b40869c7d7b98b2b9a1eecc4fd43ac7076298c 100644 (file)
@@ -343,8 +343,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
                }
                tmu->sensors[i].hw_id = i;
 
-               if (devm_thermal_add_hwmon_sysfs(&pdev->dev, tmu->sensors[i].tzd))
-                       dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
+               devm_thermal_add_hwmon_sysfs(&pdev->dev, tmu->sensors[i].tzd);
        }
 
        platform_set_drvdata(pdev, tmu);
index 839bb9958f60daf08c95b6fc60e4cf46a021aa2d..8d6b4ef23746766116b75c689bb3cca77a9dae17 100644 (file)
@@ -116,8 +116,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
                        return ret;
                }
 
-               if (devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd))
-                       dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
+               devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);
        }
 
        return 0;