[media] pvrusb2: Cocci spatch "memdup.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Thomas Meyer 2013-06-01 05:38:30 -03:00 committed by Mauro Carvalho Chehab
parent a19b56e5bc
commit 07342664d3
1 changed files with 2 additions and 2 deletions

View File

@ -354,9 +354,9 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
if (scnt < sp->buffer_slot_count) {
struct pvr2_buffer **nb = NULL;
if (scnt) {
nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL);
nb = kmemdup(sp->buffers, scnt * sizeof(*nb),
GFP_KERNEL);
if (!nb) return -ENOMEM;
memcpy(nb,sp->buffers,scnt * sizeof(*nb));
}
kfree(sp->buffers);
sp->buffers = nb;