diff options
author | Chaehyun Lim <chaehyun.lim@gmail.com> | 2016-02-01 21:26:45 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-03 15:34:29 -0800 |
commit | fa611271b4d681d02520c458c555e48ee11d61d4 (patch) | |
tree | a7ce36be50206a6921d821725d0aa96cb014d49f /drivers/staging/wilc1000/linux_mon.c | |
parent | staging: wilc1000: linux_mon: add braces on all arms of if statement (diff) | |
download | linux-dev-fa611271b4d681d02520c458c555e48ee11d61d4.tar.xz linux-dev-fa611271b4d681d02520c458c555e48ee11d61d4.zip |
staging: wilc1000: linux_mon: fix coding style of kmalloc usage
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>
Diffstat (limited to 'drivers/staging/wilc1000/linux_mon.c')
-rw-r--r-- | drivers/staging/wilc1000/linux_mon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 255383c6cf2b..a19755ebd72c 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -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; |