]> err.no Git - linux-2.6/commitdiff
[ATM]: Replacing kmalloc/memset combination with kzalloc.
authorvignesh babu <vignesh.babu@wipro.com>
Tue, 17 Jul 2007 01:30:36 +0000 (18:30 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 18 Jul 2007 08:46:51 +0000 (01:46 -0700)
Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_atm.c

index 417ec8fb7f1a6373f7184cabf2a4c50b0ab85ce4..ddc4f2c54379791de9d60bd9829c68dad52c5e54 100644 (file)
@@ -292,13 +292,12 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
                }
        }
        DPRINTK("atm_tc_change: new id %x\n", classid);
-       flow = kmalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
+       flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
        DPRINTK("atm_tc_change: flow %p\n", flow);
        if (!flow) {
                error = -ENOBUFS;
                goto err_out;
        }
-       memset(flow, 0, sizeof(*flow));
        flow->filter_list = NULL;
        if (!(flow->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid)))
                flow->q = &noop_qdisc;