Skip to content

Commit 0977397

Browse files
Sanman Pradhangroeck
authored andcommitted
hwmon: (occ) Fix missing newline in occ_show_extended()
In occ_show_extended() case 0, when the EXTN_FLAG_SENSOR_ID flag is set, the sysfs_emit format string "%u" is missing the trailing newline that the sysfs ABI expects. The else branch correctly uses "%4phN\n", and all other show functions in this file include the trailing newline. Add the missing "\n" for consistency and correct sysfs output. Fixes: c10e753 ("hwmon (occ): Add sensor types and versions") Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260326224510.294619-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 39e2a5b commit 0977397

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/occ/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static ssize_t occ_show_extended(struct device *dev,
724724
switch (sattr->nr) {
725725
case 0:
726726
if (extn->flags & EXTN_FLAG_SENSOR_ID) {
727-
rc = sysfs_emit(buf, "%u",
727+
rc = sysfs_emit(buf, "%u\n",
728728
get_unaligned_be32(&extn->sensor_id));
729729
} else {
730730
rc = sysfs_emit(buf, "%4phN\n", extn->name);

0 commit comments

Comments
 (0)