Skip to content

Commit 782f795

Browse files
vignesh babuDavid S. Miller
authored andcommitted
[ATM]: Replacing kmalloc/memset combination with kzalloc.
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>
1 parent 0929c2d commit 782f795

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎net/sched/sch_atm.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,12 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
292292
}
293293
}
294294
DPRINTK("atm_tc_change: new id %x\n", classid);
295-
flow = kmalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
295+
flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
296296
DPRINTK("atm_tc_change: flow %p\n", flow);
297297
if (!flow) {
298298
error = -ENOBUFS;
299299
goto err_out;
300300
}
301-
memset(flow, 0, sizeof(*flow));
302301
flow->filter_list = NULL;
303302
if (!(flow->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid)))
304303
flow->q = &noop_qdisc;

0 commit comments

Comments
 (0)