diff options
Diffstat (limited to 'drivers/of/platform.c')
| -rw-r--r-- | drivers/of/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index d90b1677d84e..d9a717c47ad6 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -111,7 +111,7 @@ struct platform_device *of_device_alloc(struct device_node *np, /* Populate the resource table */ if (num_reg) { - res = kcalloc(num_reg, sizeof(*res), GFP_KERNEL); + res = kzalloc_objs(*res, num_reg, GFP_KERNEL); if (!res) { platform_device_put(dev); return NULL; |
