Commit fab9f8d0 authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Inki Dae

drm/exynos: fix kcalloc size of g2d cmdlist node

The size argument means just one element size when we call kcalloc, so
G2D_CMDLIST_NUM * sizeof(*node) is wrong.
Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 2ab97921
...@@ -165,8 +165,7 @@ static int g2d_init_cmdlist(struct g2d_data *g2d) ...@@ -165,8 +165,7 @@ static int g2d_init_cmdlist(struct g2d_data *g2d)
return -ENOMEM; return -ENOMEM;
} }
node = kcalloc(G2D_CMDLIST_NUM, G2D_CMDLIST_NUM * sizeof(*node), node = kcalloc(G2D_CMDLIST_NUM, sizeof(*node), GFP_KERNEL);
GFP_KERNEL);
if (!node) { if (!node) {
dev_err(dev, "failed to allocate memory\n"); dev_err(dev, "failed to allocate memory\n");
ret = -ENOMEM; ret = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment