summaryrefslogtreecommitdiff
path: root/drivers/media/video/videobuf-dma-sg.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-05 06:07:39 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 13:16:44 +0300
commit101b25b55ec48354bc40b9102b4f7922c9ad9eae (patch)
tree9a409a45c0c7ff943cccf02c9f494119c97e2153 /drivers/media/video/videobuf-dma-sg.c
parent42e142f6b72493b5daec9950c4c83d20ccf56a0d (diff)
downloadlinux-101b25b55ec48354bc40b9102b4f7922c9ad9eae.tar.xz
[media] drivers/media: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-dma-sg.c')
-rw-r--r--drivers/media/video/videobuf-dma-sg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index 20f227ee2b3e..ab684e807034 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -69,10 +69,9 @@ static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt,
struct page *pg;
int i;
- sglist = vmalloc(nr_pages * sizeof(*sglist));
+ sglist = vzalloc(nr_pages * sizeof(*sglist));
if (NULL == sglist)
return NULL;
- memset(sglist, 0, nr_pages * sizeof(*sglist));
sg_init_table(sglist, nr_pages);
for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) {
pg = vmalloc_to_page(virt);