staging: wilc1000: fixes a struct allocation to match coding standards
authorLeo Kim <leo.kim@atmel.com>
Fri, 6 Nov 2015 02:12:23 +0000 (11:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
This patch fixes the checks reported by checkpatch.pl
for prefer kmalloc(sizeof(*tx_data)...) over kmalloc(sizeof(struct tx_complete_data)...)

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index 976964d575817414232c37dd2ecedf17dbbee604..947c9f9916004aa1670f8cf035743bcd8b63dad7 100644 (file)
@@ -1236,7 +1236,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
                return 0;
        }
 
-       tx_data = kmalloc(sizeof(struct tx_complete_data), GFP_ATOMIC);
+       tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
        if (!tx_data) {
                PRINT_ER("Failed to allocate memory for tx_data structure\n");
                dev_kfree_skb(skb);