From: Amay Agarwal Date: Tue, 3 Mar 2026 15:24:52 +0000 (+0530) Subject: hwmon: (tc74) Replace sprintf() with sysfs_emit() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8baa5fc554f342d35e679fdf6b375d0cbdc8c0b4;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20260303152456.35763-2-tt@turingtested.xyz Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/tc74.c b/drivers/hwmon/tc74.c index 9984373a25fb7..7fb7b50ad1adb 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);