diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 12:28:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:22:34 -0500 |
commit | 0d2e7a5c608063f72048899d20505c2ee130566c (patch) | |
tree | 4eae4acaf7c04bb60337389aaef8065c00b1737a /drivers/net/wireless/rndis_wlan.c | |
parent | 9d11bd1592fba0b9231d3ce8ab61977db7e03e27 (diff) |
wireless: Remove unnecessary alloc/OOM messages, alloc cleanups
alloc failures already get standardized OOM
messages and a dump_stack.
Convert kzalloc's with multiplies to kcalloc.
Convert kmalloc's with multiplies to kmalloc_array.
Remove now unused variables.
Remove unnecessary memset after kzalloc->kcalloc.
Whitespace cleanups for these changes.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index abe1d039be81..9bb3f22b3669 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1621,11 +1621,8 @@ static void set_multicast_list(struct usbnet *usbdev) | |||
1621 | } else if (mc_count) { | 1621 | } else if (mc_count) { |
1622 | int i = 0; | 1622 | int i = 0; |
1623 | 1623 | ||
1624 | mc_addrs = kmalloc(mc_count * ETH_ALEN, GFP_ATOMIC); | 1624 | mc_addrs = kmalloc_array(mc_count, ETH_ALEN, GFP_ATOMIC); |
1625 | if (!mc_addrs) { | 1625 | if (!mc_addrs) { |
1626 | netdev_warn(usbdev->net, | ||
1627 | "couldn't alloc %d bytes of memory\n", | ||
1628 | mc_count * ETH_ALEN); | ||
1629 | netif_addr_unlock_bh(usbdev->net); | 1626 | netif_addr_unlock_bh(usbdev->net); |
1630 | return; | 1627 | return; |
1631 | } | 1628 | } |