staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()
authorAjay Singh <ajay.kathat@microchip.com>
Fri, 11 May 2018 08:13:11 +0000 (13:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 12:04:48 +0000 (14:04 +0200)
Fix below reported checkpatch issues in wilc_wfi_cfg_alloc().
kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev)

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index e0015ca..65ba6ed 100644 (file)
@@ -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_;