mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
hwmon: (tc74) Replace sprintf() with sysfs_emit()
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-2-tt@turingtested.xyz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
committed by
Guenter Roeck
parent
eeca1114d1
commit
8baa5fc554
@@ -92,7 +92,7 @@ static ssize_t temp_input_show(struct device *dev,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return sprintf(buf, "%d\n", data->temp_input * 1000);
|
||||
return sysfs_emit(buf, "%d\n", data->temp_input * 1000);
|
||||
}
|
||||
static SENSOR_DEVICE_ATTR_RO(temp1_input, temp_input, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user