Commit 888f67e6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

driver core: Use 2-argument strscpy()

Use 2-argument strscpy(), which is not only shorter but also provides
an additional check that destination buffer is an array.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240821154839.604259-6-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1363030
...@@ -4867,7 +4867,7 @@ set_dev_info(const struct device *dev, struct dev_printk_info *dev_info) ...@@ -4867,7 +4867,7 @@ set_dev_info(const struct device *dev, struct dev_printk_info *dev_info)
else else
return; return;
strscpy(dev_info->subsystem, subsys, sizeof(dev_info->subsystem)); strscpy(dev_info->subsystem, subsys);
/* /*
* Add device identifier DEVICE=: * Add device identifier DEVICE=:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment