From 0d2e7a5c608063f72048899d20505c2ee130566c Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 3 Feb 2013 17:28:14 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/wireless/rndis_wlan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/net/wireless/rndis_wlan.c') 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) } else if (mc_count) { int i = 0; - mc_addrs = kmalloc(mc_count * ETH_ALEN, GFP_ATOMIC); + mc_addrs = kmalloc_array(mc_count, ETH_ALEN, GFP_ATOMIC); if (!mc_addrs) { - netdev_warn(usbdev->net, - "couldn't alloc %d bytes of memory\n", - mc_count * ETH_ALEN); netif_addr_unlock_bh(usbdev->net); return; } -- cgit v1.2.3