Skip to content

Commit

Permalink
[ATM]: Replacing kmalloc/memset combination with kzalloc.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vignesh babu authored and David S. Miller committed Jul 18, 2007
1 parent 0929c2d commit 782f795
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/sched/sch_atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 782f795

Please sign in to comment.