diff options
| author | Thorsten Blum <blum@kernel.org> | 2026-10-03 02:00:12 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-10-26 20:25:09 +0100 |
| commit | 361da59d7909a63b978fa1cd19cde65c34c86ffd (patch) | |
| tree | 1ecc4be3f24ce144ae3b765760ae7767c9401b6f /drivers | |
| parent | 82c9c94f54a444a686e926c872dae4b198d1036f (diff) | |
| download | linux-361da59d7909a63b978fa1cd19cde65c34c86ffd.tar.gz linux-361da59d7909a63b978fa1cd19cde65c34c86ffd.zip | |
thermal: sysfs: Fix indentation in create_s32_tzp_attr()
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>
Link: https://patch.msgid.link/20261003000011.58045-3-blum@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thermal/thermal_sysfs.c | 8 |
1 files 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 \ |
