summaryrefslogtreecommitdiffstats
path: root/drivers/memory/of_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memory/of_memory.c')
-rw-r--r--drivers/memory/of_memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 568f05ed961a..2f5ed7366eec 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -126,8 +126,8 @@ const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
arr_sz++;
if (arr_sz)
- timings = devm_kzalloc(dev, sizeof(*timings) * arr_sz,
- GFP_KERNEL);
+ timings = devm_kcalloc(dev, arr_sz, sizeof(*timings),
+ GFP_KERNEL);
if (!timings)
goto default_timings;