From: Thorsten Blum <blum@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>
Cc: Thorsten Blum <blum@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] thermal: sysfs: Fix indentation in create_s32_tzp_attr()
Date: Sat, 3 Oct 2026 02:00:12 +0200 [thread overview]
Message-ID: <20261003000011.58045-3-blum@kernel.org> (raw)
Indent the show callback consistently with the store callback and use an
early return if the thermal zone parameters are not available.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/thermal/thermal_sysfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 96fe5d591a0a..47daba943a76 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -287,12 +287,12 @@ sustainable_power_store(struct device *dev, struct device_attribute *devattr,
name##_show(struct device *dev, struct device_attribute *devattr, \
char *buf) \
{ \
- struct thermal_zone_device *tz = to_thermal_zone(dev); \
+ struct thermal_zone_device *tz = to_thermal_zone(dev); \
+ \
+ if (!tz->tzp) \
+ return -EIO; \
\
- if (tz->tzp) \
return sysfs_emit(buf, "%d\n", tz->tzp->name); \
- else \
- return -EIO; \
} \
\
static ssize_t \
reply other threads:[~2026-10-03 0:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261003000011.58045-3-blum@kernel.org \
--to=blum@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@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
all inboxes | Powered by JetHome®