summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-09-05 20:45:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-09-05 20:45:18 -0700
commit1fc5a74b108fc90951890ec513ac81869f5eaff1 (patch)
treeddd247abac0e8e148e4ded357db093bee4fe35ed /drivers/input/keyboard
parent9f0346dcbea363787186c94ef94dd01aaa215afa (diff)
parent3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d (diff)
downloadlinux-stable-1fc5a74b108fc90951890ec513ac81869f5eaff1.tar.gz
linux-stable-1fc5a74b108fc90951890ec513ac81869f5eaff1.zip
Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kmalloc_obj conversions from Kees Cook: "Another run of the Coccinelle script for converting kmalloc() family of allocations to kmalloc_obj() via the existing rules in scripts/coccinelle/api/kmalloc_objs.cocci" * tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: treewide: refresh kmalloc_obj() conversions drm/amd/display: Fix harmless type mismatch in allocation
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/adp5585-keys.c4
-rw-r--r--drivers/input/keyboard/atkbd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/adp5585-keys.c b/drivers/input/keyboard/adp5585-keys.c
index 017c95029..f2c1ba017 100644
--- a/drivers/input/keyboard/adp5585-keys.c
+++ b/drivers/input/keyboard/adp5585-keys.c
@@ -115,8 +115,8 @@ static int adp5585_keys_parse_fw(const struct adp5585_dev *adp5585,
"Too many keypad pins (%d) defined (max=%d)\n",
n_pins, adp5585->n_pins);
- unsigned int *keypad_pins __free(kfree) = kcalloc(n_pins, sizeof(*keypad_pins),
- GFP_KERNEL);
+ unsigned int *keypad_pins __free(kfree) = kzalloc_objs(*keypad_pins,
+ n_pins);
if (!keypad_pins)
return -ENOMEM;
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 5736f4bc5..b9ad2381f 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1070,7 +1070,7 @@ static int atkbd_get_keymap_from_fwnode(struct atkbd *atkbd)
if (n <= 0 || n > ATKBD_KEYMAP_SIZE)
return -ENXIO;
- u32 *ptr __free(kfree) = kcalloc(n, sizeof(*ptr), GFP_KERNEL);
+ u32 *ptr __free(kfree) = kzalloc_objs(*ptr, n);
if (!ptr)
return -ENOMEM;