Return-path: Received: from esa3.microchip.iphmx.com ([68.232.153.233]:42663 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbeEKIOu (ORCPT ); Fri, 11 May 2018 04:14:50 -0400 From: Ajay Singh To: CC: , , , , , , , Ajay Singh Subject: [PATCH v2 10/30] staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc() Date: Fri, 11 May 2018 13:43:11 +0530 Message-ID: <1526026411-11058-11-git-send-email-ajay.kathat@microchip.com> (sfid-20180511_103236_738653_0B3AEE33) In-Reply-To: <1526026411-11058-1-git-send-email-ajay.kathat@microchip.com> References: <1526026411-11058-1-git-send-email-ajay.kathat@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: Fix below reported checkpatch issues in wilc_wfi_cfg_alloc(). kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev) Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e0015ca..65ba6ed 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -2184,7 +2184,7 @@ static struct wireless_dev *wilc_wfi_cfg_alloc(void) { struct wireless_dev *wdev; - wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); + wdev = kzalloc(sizeof(*wdev), GFP_KERNEL); if (!wdev) goto _fail_; -- 2.7.4