From: Leo Kim Date: Fri, 6 Nov 2015 02:12:23 +0000 (+0900) Subject: staging: wilc1000: fixes a struct allocation to match coding standards X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b38e903090e12503a21183916ec8e5101b3ed610;p=linux-beck.git staging: wilc1000: fixes a struct allocation to match coding standards 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 Signed-off-by: Glen Lee Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 976964d57581..947c9f991600 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -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);