diff mbox series

thermal/sysfs: remove unnecessary check in trip_point_hyst_show()

Message ID Y0pu2M6kKzIlhCMw@kili (mailing list archive)
State Not Applicable, archived
Headers show
Series thermal/sysfs: remove unnecessary check in trip_point_hyst_show() | expand

Commit Message

Dan Carpenter Oct. 15, 2022, 8:27 a.m. UTC
The "ret" variable is zero at this point.  No need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/thermal/thermal_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Lezcano Oct. 17, 2022, 7:21 a.m. UTC | #1
On 15/10/2022 10:27, Dan Carpenter wrote:
> The "ret" variable is zero at this point.  No need to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 8d7b25ab67c2..af3dced054f3 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -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