Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[muen/linux.git] / drivers / hid / wacom_sys.c
index 545986cfb9788a9fe0872a4b342d1e39f2d4dae7..d6797535fff97217b477cf7c2009397dcce2d1ec 100644 (file)
@@ -1371,7 +1371,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;
@@ -1471,7 +1471,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;