diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:00:11 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-09-19 06:17:05 -0700 |
commit | f2f394db4b5eb1d3e609c93ad85bb4d2d0490121 (patch) | |
tree | 1303aa3cc8255950b95771dac72a3cd4b2e79977 /drivers/hwmon/emc2103.c | |
parent | eb12f54876bb5b7789339610692b70f7f9c925a5 (diff) |
hwmon: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220818210014.6769-1-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/emc2103.c')
-rw-r--r-- | drivers/hwmon/emc2103.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c index e4c95ca9e19f..361cf9292456 100644 --- a/drivers/hwmon/emc2103.c +++ b/drivers/hwmon/emc2103.c @@ -643,7 +643,7 @@ emc2103_detect(struct i2c_client *new_client, struct i2c_board_info *info) if ((product != 0x24) && (product != 0x26)) return -ENODEV; - strlcpy(info->type, "emc2103", I2C_NAME_SIZE); + strscpy(info->type, "emc2103", I2C_NAME_SIZE); return 0; } |