summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wlan.c
diff options
context:
space:
mode:
authorLeo Kim2015-11-06 03:12:59 +0100
committerGreg Kroah-Hartman2015-11-16 05:02:47 +0100
commit1d401a4d66f6a3b1c70eec21288fe05d804d4bd8 (patch)
treeb5e3920e1aaff4b9226e37849a700122791b6daf /drivers/staging/wilc1000/wilc_wlan.c
parentstaging: wilc1000: rename is_TCP_ACK_Filter_Enabled function (diff)
downloadkernel-qcow2-linux-1d401a4d66f6a3b1c70eec21288fe05d804d4bd8.tar.gz
kernel-qcow2-linux-1d401a4d66f6a3b1c70eec21288fe05d804d4bd8.tar.xz
kernel-qcow2-linux-1d401a4d66f6a3b1c70eec21288fe05d804d4bd8.zip
staging: wilc1000: fixes a struct allocation to match coding standards
This patch fixes the checks reported by checkpatch.pl for prefer kmalloc(sizeof(*tqe)...) over kmalloc(sizeof(struct txq_entry_t)...) 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>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan.c')
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 78a43590e645..0c08a9ac38ae 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -413,7 +413,7 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)
return 0;
}
- tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC);
+ tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
if (!tqe) {
PRINT_ER("Failed to allocate memory\n");
return 0;
@@ -443,7 +443,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
if (p->quit)
return 0;
- tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC);
+ tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
if (!tqe)
return 0;
@@ -472,7 +472,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
if (p->quit)
return 0;
- tqe = kmalloc(sizeof(struct txq_entry_t), GFP_KERNEL);
+ tqe = kmalloc(sizeof(*tqe), GFP_KERNEL);
if (!tqe)
return 0;