summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/tcm-sita.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-12-15 12:20:53 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-15 13:37:06 +0100
commit07a6dc19a36912a1bea7ce1d5856c5616c30839a (patch)
tree5e0a9d2f29158d349bbb3dd03b77b40a5d4688a1 /drivers/gpu/drm/omapdrm/tcm-sita.c
parentd4b20e4dcbb3bb08362c55b2f9183588a4a3af33 (diff)
drm/omap: use kzalloc in sita_init()
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-6-git-send-email-boris.brezillon@free-electrons.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/tcm-sita.c')
-rw-r--r--drivers/gpu/drm/omapdrm/tcm-sita.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/tcm-sita.c b/drivers/gpu/drm/omapdrm/tcm-sita.c
index efb609510540..6df1f2a1bc52 100644
--- a/drivers/gpu/drm/omapdrm/tcm-sita.c
+++ b/drivers/gpu/drm/omapdrm/tcm-sita.c
@@ -87,14 +87,11 @@ struct tcm *sita_init(u16 width, u16 height, struct tcm_pt *attr)
if (width == 0 || height == 0)
return NULL;
- tcm = kmalloc(sizeof(*tcm), GFP_KERNEL);
- pvt = kmalloc(sizeof(*pvt), GFP_KERNEL);
+ tcm = kzalloc(sizeof(*tcm), GFP_KERNEL);
+ pvt = kzalloc(sizeof(*pvt), GFP_KERNEL);
if (!tcm || !pvt)
goto error;
- memset(tcm, 0, sizeof(*tcm));
- memset(pvt, 0, sizeof(*pvt));
-
/* Updating the pointers to SiTA implementation APIs */
tcm->height = height;
tcm->width = width;