[SCHED]: Use kmemdup & kzalloc where appropriate

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2006-11-21 01:19:40 -02:00
committed by David S. Miller
parent b3ab09f9e1
commit c7b1b24978
6 changed files with 7 additions and 15 deletions

View File

@@ -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);