summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/idt_89hpesx.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-19 00:00:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-01 17:29:42 +0300
commit5192e395c5cfa6f3d23165db38365ec7f8c5ee7a (patch)
tree2fc56aeffb96da82644100d0fff0c14a13876f21 /drivers/misc/eeprom/idt_89hpesx.c
parentf667f56b2f55881a705e5a67d30d71e5fb75dbe3 (diff)
downloadlinux-5192e395c5cfa6f3d23165db38365ec7f8c5ee7a.tar.xz
misc: 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/20220818210031.7036-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom/idt_89hpesx.c')
-rw-r--r--drivers/misc/eeprom/idt_89hpesx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 9aec3338e37d..01614fec40fe 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1075,7 +1075,7 @@ static const struct i2c_device_id *idt_ee_match_id(struct fwnode_handle *fwnode)
return NULL;
p = strchr(compatible, ',');
- strlcpy(devname, p ? p + 1 : compatible, sizeof(devname));
+ strscpy(devname, p ? p + 1 : compatible, sizeof(devname));
/* Search through the device name */
while (id->name[0]) {
if (strcmp(devname, id->name) == 0)