diff options
| author | Amay Agarwal <tt@turingtested.xyz> | 2026-03-03 20:54:52 +0530 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-03-30 19:45:05 -0700 |
| commit | 8baa5fc554f342d35e679fdf6b375d0cbdc8c0b4 (patch) | |
| tree | 65d6bdfee14e67d10c90e7facf3e526663984cae | |
| parent | eeca1114d1e2cc0eacaebb80f3f2afbaebfc60be (diff) | |
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>
| -rw-r--r-- | drivers/hwmon/tc74.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/tc74.c b/drivers/hwmon/tc74.c index 9984373a25fb..7fb7b50ad1ad 100644 --- a/drivers/hwmon/tc74.c +++ b/drivers/hwmon/tc74.c @@ -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); |
