diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2024-08-21 18:48:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-22 15:37:38 +0800 |
commit | 888f67e621dda5c2804a696524e28d0ca4cf0a80 (patch) | |
tree | beadb9b5a181bf8303f3dd2da1d6d725e9426a4d /drivers/base | |
parent | d1363030d824b244744399ddd85a52cf615dee4c (diff) |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240821154839.604259-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 980c08901cd0..4bc8b88d697e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -4867,7 +4867,7 @@ set_dev_info(const struct device *dev, struct dev_printk_info *dev_info) else return; - strscpy(dev_info->subsystem, subsys, sizeof(dev_info->subsystem)); + strscpy(dev_info->subsystem, subsys); /* * Add device identifier DEVICE=: |