diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2013-06-01 10:38:30 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 18:17:35 +0200 |
commit | 07342664d3725de4b21478da222593da491afcd8 (patch) | |
tree | 18879721ad297c901d3d5a00046e9e0180fa42c9 /drivers/media/usb/pvrusb2/pvrusb2-io.c | |
parent | [media] drivers/media/pci/mantis/mantis_cards: Convert to module_pci_driver (diff) | |
download | linux-07342664d3725de4b21478da222593da491afcd8.tar.xz linux-07342664d3725de4b21478da222593da491afcd8.zip |
[media] pvrusb2: Cocci spatch "memdup.spatch"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/pvrusb2/pvrusb2-io.c')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c index 20b6ae0bb40d..1e354747de3f 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-io.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c @@ -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; |