summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-27 12:54:06 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-27 12:54:06 -0700
commit8e333791d4605dbce611c22f71a86721c9afc336 (patch)
treef5d18c9530b6af74d966faf3f351c7566ed65baf
parentbf80f1391a425081b96f9e04e5c608f854858aaa (diff)
parent3ae08e47742eeebf2190900d31ddac53fdd13a5b (diff)
Merge tag 'gpio-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fix from Bartosz Golaszewski: - don't use sprintf() with non-constant format string * tag 'gpio-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: virtuser: avoid non-constant format string
-rw-r--r--drivers/gpio/gpio-virtuser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-virtuser.c b/drivers/gpio/gpio-virtuser.c
index 0e0d55da4f01..ccc47ea0b3e1 100644
--- a/drivers/gpio/gpio-virtuser.c
+++ b/drivers/gpio/gpio-virtuser.c
@@ -805,7 +805,7 @@ static int gpio_virtuser_dbgfs_init_line_attrs(struct device *dev,
return -ENOMEM;
data->ad.desc = desc;
- sprintf(data->consumer, id);
+ strscpy(data->consumer, id);
atomic_set(&data->irq, 0);
atomic_set(&data->irq_count, 0);