From: Rasmus Villemoes Date: Tue, 15 Dec 2015 11:20:53 +0000 (+0100) Subject: drm/omap: use kzalloc in sita_init() X-Git-Tag: v4.5-rc1~74^2~24^2~25 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=07a6dc19a36912a1bea7ce1d5856c5616c30839a;p=linux.git drm/omap: use kzalloc in sita_init() Signed-off-by: Rasmus Villemoes Signed-off-by: Thierry Reding Signed-off-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-6-git-send-email-boris.brezillon@free-electrons.com Signed-off-by: Daniel Vetter --- 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;