Use kzalloc versus kmalloc+memset. Also don't need to do
memset() of bridge address since it is in netdev private data
that is already zero'd in alloc_netdev.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- br-2.6.orig/net/bridge/br_if.c
+++ br-2.6/net/bridge/br_if.c
@@ -210,7 +210,6 @@ static struct net_device *new_bridge_dev
 
        br->bridge_id.prio[0] = 0x80;
        br->bridge_id.prio[1] = 0x00;
-       memset(br->bridge_id.addr, 0, ETH_ALEN);
 
        br->feature_mask = dev->features;
        br->stp_enabled = 0;
@@ -263,11 +262,10 @@ static struct net_bridge_port *new_nbp(s
        if (index < 0)
                return ERR_PTR(index);
 
-       p = kmalloc(sizeof(*p), GFP_KERNEL);
+       p = kzalloc(sizeof(*p), GFP_KERNEL);
        if (p == NULL)
                return ERR_PTR(-ENOMEM);
 
-       memset(p, 0, sizeof(*p));
        p->br = br;
        dev_hold(dev);
        p->dev = dev;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to