Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932951AbdCISw0 (ORCPT ); Thu, 9 Mar 2017 13:52:26 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34472 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932850AbdCISwY (ORCPT ); Thu, 9 Mar 2017 13:52:24 -0500 From: sunil.m@techveda.org To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, suniel.spartan@gmail.com, Suniel Mahesh Subject: [PATCH v2 5/5] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct Date: Fri, 10 Mar 2017 00:20:48 +0530 Message-Id: <1489085448-3243-6-git-send-email-sunil.m@techveda.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489085448-3243-1-git-send-email-sunil.m@techveda.org> References: <20170307171229.GE4171@mwanda> <1489085448-3243-1-git-send-email-sunil.m@techveda.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 30 From: Suniel Mahesh Prefer vzalloc(sizeof(*priv->pFirmware)...) over vzalloc(sizeof(struct rt_firmware)...) as reported by checkpatch.pl Signed-off-by: Suniel Mahesh --- Changes for v2: - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index fb711d2..a099bce 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -965,7 +965,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->card_type = PCI; - priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); + priv->pFirmware = vzalloc(sizeof(*priv->pFirmware)); if (!priv->pFirmware) return -ENOMEM; skb_queue_head_init(&priv->skb_queue); -- 1.9.1