Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740Ab3CKHck (ORCPT ); Mon, 11 Mar 2013 03:32:40 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1047 Lines: 32 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; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/