summaryrefslogtreecommitdiff
path: root/drivers/input/sparse-keymap.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2025-05-15 16:20:39 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2025-05-15 16:20:39 -0700
commitd51b9d81f7883f526b26e3ab903e646274aebeb1 (patch)
tree9027f2e9b9f7529eda9220c4bcb38e4541c81646 /drivers/input/sparse-keymap.c
parent74d3da135f69a910df0f3487bebd3de540450d4a (diff)
parent82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3 (diff)
Merge tag 'v6.15-rc6' into next
Sync up with mainline to bring in xpad controller changes.
Diffstat (limited to 'drivers/input/sparse-keymap.c')
-rw-r--r--drivers/input/sparse-keymap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c
index 25bf8be6e711..96f23ae57d5a 100644
--- a/drivers/input/sparse-keymap.c
+++ b/drivers/input/sparse-keymap.c
@@ -176,8 +176,7 @@ int sparse_keymap_setup(struct input_dev *dev,
for (e = keymap; e->type != KE_END; e++)
map_size++;
- map = devm_kmemdup(&dev->dev, keymap, map_size * sizeof(*map),
- GFP_KERNEL);
+ map = devm_kmemdup_array(&dev->dev, keymap, map_size, sizeof(*keymap), GFP_KERNEL);
if (!map)
return -ENOMEM;