|
@@ -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;
|