From patchwork Wed Sep 30 19:53:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 7303441 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5FF749F39B for ; Thu, 1 Oct 2015 00:53:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7299020722 for ; Thu, 1 Oct 2015 00:53:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 59922206C5 for ; Thu, 1 Oct 2015 00:53:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05C656E537; Wed, 30 Sep 2015 17:53:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDD706E8C5 for ; Wed, 30 Sep 2015 12:54:07 -0700 (PDT) Received: by labzv5 with SMTP id zv5so59723761lab.1 for ; Wed, 30 Sep 2015 12:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mHjUkzCGt8rWXAqK0y0CrkOlvJOjlCdGBNu3+zYlsXk=; b=SoDDjj6fXgTaRiHOIkAd0ngPcI+W+6ELe747rdyx1b/QkaJTUTf4UaH8JNYkS1M3Xk z1GXX3GTs77dpbmUbm3YVgumEqD1/qFYMhMZELaChryLU6wRlM+xHiXv40UEhVywiyAE X6wz4J+6NW/8CAnhlCMt/4wDHs69whLKa3ik0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mHjUkzCGt8rWXAqK0y0CrkOlvJOjlCdGBNu3+zYlsXk=; b=EA/Q2vT1yKyy2UWx+GC5EOWNoXj4Eh+82rDlCzLLli8ccpP+xPTxjG60Di5y+Mngmd mZq+zwxsU1qtPR7gfDVlHY4BRH2HQ55cuAolZEBzo3ZTpwsIrP4q2uOjrJRqRePgm/Nm vTSjJFqgQ88mx2mhiONSiHdrfLwdZdKRwJVSTQVLHuyAH7gVx1hLLjAYXAhOwFOX8Zhs GEW/7VM5EcM+eRUE3icg923e1vhdxUubM4CJGY8b36Miez3QA6MYR26Tkhx1du7gcryr eAcGI/t7Fjnr2G69aVbVQQbTiLp4IftlFUENiMMzdmmEPo+qk8YFVOWhzRDo+AWDEOyb ktGA== X-Gm-Message-State: ALoCoQkPB/OeHFkW08ZdFHCmmtuxDd12pkCwij5G+/3/a5uNwMLHXxaTTZ+/8r6b3Hi0Q226GDuV X-Received: by 10.112.128.168 with SMTP id np8mr1578303lbb.85.1443642845637; Wed, 30 Sep 2015 12:54:05 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by smtp.gmail.com with ESMTPSA id o195sm249988lfe.17.2015.09.30.12.54.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2015 12:54:05 -0700 (PDT) From: Rasmus Villemoes To: David Airlie 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> X-Mailman-Approved-At: Wed, 30 Sep 2015 17:53:24 -0700 Cc: Rasmus Villemoes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;