thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/thermal/thermal_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_sysfs.c +1 -1
@@ -190,7 +190,7 @@ trip_point_hyst_show(struct device *dev, struct device_attribute *attr,if (ret)return ret; -return ret ? ret :sprintf (buf,"%d\n" , trip.hysteresis); +return sprintf (buf,"%d\n" , trip.hysteresis); } static ssize_t
Signature · 1 line
2.35.1
Daniel Lezcano
AppliedQuoted 4 lines · Dan Carpenter
The "ret" variable is zero at this point. No need to check.
Signed-off-by Dan Carpenter <[email protected]>---
Applied, thanks
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
The following commit has been merged into the thermal/next branch of thermal:
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 <[email protected]> AuthorDate: Sat, 15 Oct 2022 11:27:04 +03:00 Committer: Daniel Lezcano <[email protected]> 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 <[email protected]>
Signed-off-by Daniel Lezcano <[email protected]>
--- drivers/thermal/thermal_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_sysfs.c +1 -1
@@ -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