]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/extcon/extcon-arizona.c
extcon: arizona: Use devm_kcalloc() in arizona_extcon_get_micd_configs()
[mirror_ubuntu-artful-kernel.git] / drivers / extcon / extcon-arizona.c
index e2d78cd7030d3b0935c20f737906cf92f350a403..f84da4a17724c4600d8a2e26ca94dc436eb62124 100644 (file)
@@ -1271,9 +1271,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev,
                goto out;
 
        nconfs /= entries_per_config;
-
-       micd_configs = devm_kzalloc(dev,
-                                   nconfs * sizeof(struct arizona_micd_range),
+       micd_configs = devm_kcalloc(dev, nconfs, sizeof(*micd_configs),
                                    GFP_KERNEL);
        if (!micd_configs) {
                ret = -ENOMEM;