staging: wilc1000: linux_mon: fix coding style of kmalloc usage
authorChaehyun Lim <chaehyun.lim@gmail.com>
Mon, 1 Feb 2016 12:26:45 +0000 (21:26 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 23:34:29 +0000 (15:34 -0800)
This patch fixes coding style of kmalloc usage found by checkpatch.pl
CHECK: Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
tx_complete_mon_data)...)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_mon.c

index 255383c6cf2b3d6a911cc7a0f017b849c6033409..a19755ebd72c301bb9dc766493841d9c5a0d1e69 100644 (file)
@@ -163,7 +163,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
        }
 
        netif_stop_queue(dev);
-       mgmt_tx = kmalloc(sizeof(struct tx_complete_mon_data), GFP_ATOMIC);
+       mgmt_tx = kmalloc(sizeof(*mgmt_tx), GFP_ATOMIC);
        if (!mgmt_tx) {
                PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
                return -EFAULT;