lkml.org 
[lkml]   [2023]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] thermal/drivers/amlogic: Remove redundant msg in amlogic_thermal_probe()
Date
The upper-layer devm_thermal_of_zone_register() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/thermal/amlogic_thermal.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 756b218880a7..134f5a8d1019 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -276,11 +276,8 @@ static int amlogic_thermal_probe(struct platform_device *pdev)
0,
pdata,
&amlogic_thermal_ops);
- if (IS_ERR(pdata->tzd)) {
- ret = PTR_ERR(pdata->tzd);
- dev_err(dev, "Failed to register tsensor: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(pdata->tzd))
+ return PTR_ERR(pdata->tzd);

devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd);

--
2.39.0
\
 
 \ /
  Last update: 2023-07-11 14:46    [W:0.046 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site