summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index ee7a37eb159a..c101369b51de 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1363,7 +1363,7 @@ static int wacom_led_groups_alloc_and_register_one(struct device *dev,
if (!devres_open_group(dev, &wacom->led.groups[group_id], GFP_KERNEL))
return -ENOMEM;
- leds = devm_kzalloc(dev, sizeof(struct wacom_led) * count, GFP_KERNEL);
+ leds = devm_kcalloc(dev, count, sizeof(struct wacom_led), GFP_KERNEL);
if (!leds) {
error = -ENOMEM;
goto err;
@@ -1463,7 +1463,7 @@ static int wacom_led_groups_allocate(struct wacom *wacom, int count)
struct wacom_group_leds *groups;
int error;
- groups = devm_kzalloc(dev, sizeof(struct wacom_group_leds) * count,
+ groups = devm_kcalloc(dev, count, sizeof(struct wacom_group_leds),
GFP_KERNEL);
if (!groups)
return -ENOMEM;