From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754154AbbI3TyK (ORCPT ); Wed, 30 Sep 2015 15:54:10 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:33034 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbbI3TyH (ORCPT ); Wed, 30 Sep 2015 15:54:07 -0400 From: Rasmus Villemoes To: David Airlie Cc: Rasmus Villemoes , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/omap: use kzalloc in sita_init() Date: Wed, 30 Sep 2015 21:53:49 +0200 Message-Id: <1443642829-3590-2-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1443642829-3590-1-git-send-email-linux@rasmusvillemoes.dk> References: <1443642829-3590-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/gpu/drm/omapdrm/tcm-sita.c | 7 ++----- 1 file 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; -- 2.1.3