Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
888f67e6 d1363030

+1 -1
+1 -1
drivers/base/core.c
··· 4867 4867 else 4868 4868 return; 4869 4869 4870 - strscpy(dev_info->subsystem, subsys, sizeof(dev_info->subsystem)); 4870 + strscpy(dev_info->subsystem, subsys); 4871 4871 4872 4872 /* 4873 4873 * Add device identifier DEVICE=: