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>
This commit is contained in:
Thorsten Blum 2026-10-03 02:00:12 +02:00 committed by Rafael J. Wysocki
parent 82c9c94f54
commit 361da59d79

View File

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