public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "thermal-bot for Dan Carpenter" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/sysfs: remove unnecessary check in trip_point_hyst_show()
Date: Fri, 09 Dec 2022 15:26:31 -0000	[thread overview]
Message-ID: <167059959175.4906.316857501482540497.tip-bot2@tip-bot2> (raw)
In-Reply-To: <Y0pu2M6kKzIlhCMw@kili>

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

      parent reply	other threads:[~2022-12-09 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167059959175.4906.316857501482540497.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox