diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 01:19:40 -0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:30:18 -0800 |
commit | c7b1b24978d89efab7d420bbdc9557dbe6259c89 (patch) | |
tree | f9b05485df5d1cb1532d0251e3da782e1bbad9fe /net/sched/em_nbyte.c | |
parent | b3ab09f9e1681916df349d54232fbb3f8a79bfa5 (diff) | |
download | op-kernel-dev-c7b1b24978d89efab7d420bbdc9557dbe6259c89.zip op-kernel-dev-c7b1b24978d89efab7d420bbdc9557dbe6259c89.tar.gz |
[SCHED]: Use kmemdup & kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sched/em_nbyte.c')
-rw-r--r-- | net/sched/em_nbyte.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c index cc80bab..005db40 100644 --- a/net/sched/em_nbyte.c +++ b/net/sched/em_nbyte.c @@ -34,12 +34,10 @@ static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len, return -EINVAL; em->datalen = sizeof(*nbyte) + nbyte->len; - em->data = (unsigned long) kmalloc(em->datalen, GFP_KERNEL); + em->data = (unsigned long)kmemdup(data, em->datalen, GFP_KERNEL); if (em->data == 0UL) return -ENOBUFS; - memcpy((void *) em->data, data, em->datalen); - return 0; } |