drm/exynos: fix kcalloc size of g2d cmdlist node
authorJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 27 Sep 2012 10:26:03 +0000 (19:26 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 4 Oct 2012 01:10:56 +0000 (10:10 +0900)
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 <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_g2d.c

index dcbc4cb423be95b47e15a1fc92565960ace35158..3fbe5915ccce089bd8ee0b0c756e7cffed9a0f4b 100644 (file)
@@ -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;