mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
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:
parent
82c9c94f54
commit
361da59d79
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user