From: Joonyoung Shim Date: Thu, 27 Sep 2012 10:26:03 +0000 (+0900) Subject: drm/exynos: fix kcalloc size of g2d cmdlist node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fab9f8d093a60e524efbf6afe6c10e10c91f1642;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Joonyoung Shim Signed-off-by: Kyungmin Park Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index dcbc4cb423be..3fbe5915ccce 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -165,8 +165,7 @@ static int g2d_init_cmdlist(struct g2d_data *g2d) return -ENOMEM; } - node = kcalloc(G2D_CMDLIST_NUM, G2D_CMDLIST_NUM * sizeof(*node), - GFP_KERNEL); + node = kcalloc(G2D_CMDLIST_NUM, sizeof(*node), GFP_KERNEL); if (!node) { dev_err(dev, "failed to allocate memory\n"); ret = -ENOMEM;