[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

@@ -71,11 +71,10 @@ static int tcf_simp_release(struct tcf_defact *d, int bind)
static int alloc_defdata(struct tcf_defact *d, u32 datalen, void *defdata)
{
d->tcfd_defdata = kmalloc(datalen, GFP_KERNEL);
d->tcfd_defdata = kmemdup(defdata, datalen, GFP_KERNEL);
if (unlikely(!d->tcfd_defdata))
return -ENOMEM;
d->tcfd_datalen = datalen;
memcpy(d->tcfd_defdata, defdata, datalen);
return 0;
}