Merge tag 'for-linus-20180713' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / drivers / regulator / max1586.c
index 66bbaa9..cc52779 100644 (file)
@@ -194,8 +194,10 @@ static int of_get_max1586_platform_data(struct device *dev,
        if (matched <= 0)
                return matched;
 
-       pdata->subdevs = devm_kzalloc(dev, sizeof(struct max1586_subdev_data) *
-                                               matched, GFP_KERNEL);
+       pdata->subdevs = devm_kcalloc(dev,
+                                     matched,
+                                     sizeof(struct max1586_subdev_data),
+                                     GFP_KERNEL);
        if (!pdata->subdevs)
                return -ENOMEM;