Commit 1d401a4d authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

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: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44c4417d
...@@ -413,7 +413,7 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size) ...@@ -413,7 +413,7 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)
return 0; return 0;
} }
tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC); tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
if (!tqe) { if (!tqe) {
PRINT_ER("Failed to allocate memory\n"); PRINT_ER("Failed to allocate memory\n");
return 0; return 0;
...@@ -443,7 +443,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -443,7 +443,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
if (p->quit) if (p->quit)
return 0; return 0;
tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC); tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
if (!tqe) if (!tqe)
return 0; return 0;
...@@ -472,7 +472,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -472,7 +472,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
if (p->quit) if (p->quit)
return 0; return 0;
tqe = kmalloc(sizeof(struct txq_entry_t), GFP_KERNEL); tqe = kmalloc(sizeof(*tqe), GFP_KERNEL);
if (!tqe) if (!tqe)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment