From ae6056b248ebbcbdd0f0134678ce77b165edca1a Mon Sep 17 00:00:00 2001 From: Aayush Kumar Date: Fri, 9 Oct 2026 19:06:06 +0530 Subject: [PATCH] spi: lm70llp: Use strscpy() instead of strcpy() Use a safer function strscpy() instead of strcpy() for copying to arrays. Only idiomatic code replacement, and no functional changes. Signed-off-by: Aayush Kumar Link: https://patch.msgid.link/20261009133609.579046-3-code@aayushk.dev Signed-off-by: Mark Brown --- drivers/spi/spi-lm70llp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c index e61e89b4119f..bd80288920d0 100644 --- a/drivers/spi/spi-lm70llp.c +++ b/drivers/spi/spi-lm70llp.c @@ -252,7 +252,7 @@ static void spi_lm70llp_attach(struct parport *p) * We are binding to the generic drivers/hwmon/lm70.c device * driver. */ - strcpy(pp->info.modalias, "lm70"); + strscpy(pp->info.modalias, "lm70", sizeof(pp->info.modalias)); pp->info.max_speed_hz = 6 * 1000 * 1000; pp->info.chip_select = 0; pp->info.mode = SPI_3WIRE | SPI_MODE_0; -- knotmirror 0.0.1