public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
@ 2022-10-15  8:27 Dan Carpenter
  2022-10-17  7:21 ` Daniel Lezcano
  2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-10-15  8:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano
  Cc: Daniel Lezcano, Amit Kucheria, Zhang Rui, linux-pm,
	kernel-janitors

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(-)

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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-09 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-15  8:27 [PATCH] thermal/sysfs: remove unnecessary check in trip_point_hyst_show() Dan Carpenter
2022-10-17  7:21 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox