From patchwork Mon Mar 11 07:32:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Silviu-Mihai Popescu X-Patchwork-Id: 2247131 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3FB603FC8F for ; Mon, 11 Mar 2013 07:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752063Ab3CKHcj (ORCPT ); Mon, 11 Mar 2013 03:32:39 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:41234 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668Ab3CKHci (ORCPT ); Mon, 11 Mar 2013 03:32:38 -0400 Received: by mail-we0-f176.google.com with SMTP id s43so3209721wey.35 for ; Mon, 11 Mar 2013 00:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=86QtAm7/PrwJnM+pD58IIfrgKwIdy55AWeXi6Pjgh+8=; b=j5ZHgBTJHk1nqPjAxaHIf4n/4zBk2tTzFuEgO738J05jKgDAvFC3QokPfZ6AmPZt6l FKFWc5UpcIitllLt8vGjX45DCqbgVc2OdLkfT1Wl5PIWZ8p+zldjbjD9hiMHuylYK7CU 9243k5zWPjnyoBp7OjWPl0rxSlq4Fb4qhki7GxQFHtyvfoUbZvaGKo9W+wGL0F6tDrOp BVY3Ozx1n1X9qhR7f6KFVgx6R0AtJGmqtayRo77wjte4hYtSDb3CKBX2Ap9r6J/R2/f5 yd2g/Uwj0FghFtRdpJxdyljXNty1vHyZRm/0+sjeJsGPBGO4nzmgOV+FeLtIopwPV5nY grEg== X-Received: by 10.194.170.165 with SMTP id an5mr16894685wjc.41.1362987157171; Mon, 11 Mar 2013 00:32:37 -0700 (PDT) Received: from localhost.localdomain (p5.eregie.pub.ro. [141.85.0.105]) by mx.google.com with ESMTPS id eo1sm13771917wib.8.2013.03.11.00.32.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 00:32:36 -0700 (PDT) From: Silviu-Mihai Popescu To: linux-fbdev@vger.kernel.org Cc: FlorianSchandinat@gmx.de, linux-kernel@vger.kernel.org, Silviu-Mihai Popescu Subject: [PATCH] matrox: fix coccicheck warning in matroxfb_base.c Date: Mon, 11 Mar 2013 09:32:33 +0200 Message-Id: <1362987153-6290-1-git-send-email-silviupopescu1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org This replaces a call to kmalloc() followed by memset() with just one call to kzalloc(). Signed-off-by: Silviu-Mihai Popescu --- drivers/video/matrox/matroxfb_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 401a56e..2456529 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c @@ -2029,10 +2029,9 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm return -1; } - minfo = kmalloc(sizeof(*minfo), GFP_KERNEL); + minfo = kzalloc(sizeof(*minfo), GFP_KERNEL); if (!minfo) return -1; - memset(minfo, 0, sizeof(*minfo)); minfo->pcidev = pdev; minfo->dead = 0;