diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 04:19:40 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 06:30:18 +0100 |
commit | c7b1b24978d89efab7d420bbdc9557dbe6259c89 (patch) | |
tree | f9b05485df5d1cb1532d0251e3da782e1bbad9fe /net/sched/cls_api.c | |
parent | [IRDA]: Use kmemdup where applicable (diff) | |
download | linux-c7b1b24978d89efab7d420bbdc9557dbe6259c89.tar.xz linux-c7b1b24978d89efab7d420bbdc9557dbe6259c89.zip |
[SCHED]: Use kmemdup & kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 37a184021647..edb8fc97ae11 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -217,7 +217,7 @@ replay: /* Create new proto tcf */ err = -ENOBUFS; - if ((tp = kmalloc(sizeof(*tp), GFP_KERNEL)) == NULL) + if ((tp = kzalloc(sizeof(*tp), GFP_KERNEL)) == NULL) goto errout; err = -EINVAL; tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND-1]); @@ -247,7 +247,6 @@ replay: kfree(tp); goto errout; } - memset(tp, 0, sizeof(*tp)); tp->ops = tp_ops; tp->protocol = protocol; tp->prio = nprio ? : tcf_auto_prio(*back); |