diff mbox series

[thermal:,thermal/next] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()

Message ID 167059959175.4906.316857501482540497.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/next] thermal/sysfs: remove unnecessary check in trip_point_hyst_show() | expand

Commit Message

thermal-bot for Julien Panis Dec. 9, 2022, 3:26 p.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     1627cd2f820ad90d3249e6b4e6f1dbadfbed0d33
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//1627cd2f820ad90d3249e6b4e6f1dbadfbed0d33
Author:        Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate:    Sat, 15 Oct 2022 11:27:04 +03:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:43 +01:00

thermal/sysfs: remove unnecessary check in trip_point_hyst_show()

The "ret" variable is zero at this point.  No need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Y0pu2M6kKzIlhCMw@kili
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/thermal_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index cef860d..d37133a 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -226,7 +226,7 @@  trip_point_hyst_show(struct device *dev, struct device_attribute *attr,
 
 	mutex_unlock(&tz->lock);
 
-	return ret ? ret : sprintf(buf, "%d\n", trip.hysteresis);
+	return sprintf(buf, "%d\n", trip.hysteresis);
 }
 
 static ssize_t