Commit b66a6085 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by David S. Miller

net: mv643xx_eth: use kzalloc

The double memset is a little ugly; using kzalloc avoids it altogether.
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9b5ac27
...@@ -1859,14 +1859,11 @@ static void mv643xx_eth_program_multicast_filter(struct net_device *dev) ...@@ -1859,14 +1859,11 @@ static void mv643xx_eth_program_multicast_filter(struct net_device *dev)
return; return;
} }
mc_spec = kmalloc(0x200, GFP_ATOMIC); mc_spec = kzalloc(0x200, GFP_ATOMIC);
if (mc_spec == NULL) if (mc_spec == NULL)
goto oom; goto oom;
mc_other = mc_spec + (0x100 >> 2); mc_other = mc_spec + (0x100 >> 2);
memset(mc_spec, 0, 0x100);
memset(mc_other, 0, 0x100);
netdev_for_each_mc_addr(ha, dev) { netdev_for_each_mc_addr(ha, dev) {
u8 *a = ha->addr; u8 *a = ha->addr;
u32 *table; u32 *table;
......
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