diff --git a/[refs] b/[refs] index 0eff88a706bd..2ac357b22ece 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a95fcacdc33fa12836c306deb085ef3e68bca15a +refs/heads/master: 3b781fa10bcdb148924d1847f68899583e0d66ef diff --git a/trunk/net/bridge/br_if.c b/trunk/net/bridge/br_if.c index f36b35edd60c..738cb3afa99a 100644 --- a/trunk/net/bridge/br_if.c +++ b/trunk/net/bridge/br_if.c @@ -237,12 +237,11 @@ static int find_portno(struct net_bridge *br) struct net_bridge_port *p; unsigned long *inuse; - inuse = kmalloc(BITS_TO_LONGS(BR_MAX_PORTS)*sizeof(unsigned long), + inuse = kcalloc(BITS_TO_LONGS(BR_MAX_PORTS), sizeof(unsigned long), GFP_KERNEL); if (!inuse) return -ENOMEM; - memset(inuse, 0, BITS_TO_LONGS(BR_MAX_PORTS)*sizeof(unsigned long)); set_bit(0, inuse); /* zero is reserved */ list_for_each_entry(p, &br->port_list, list) { set_bit(p->port_no, inuse);