diff options
Diffstat (limited to 'drivers/media/video/videobuf-dma-sg.c')
-rw-r--r-- | drivers/media/video/videobuf-dma-sg.c | 3 |
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, | |||
69 | struct page *pg; | 69 | struct page *pg; |
70 | int i; | 70 | int i; |
71 | 71 | ||
72 | sglist = vmalloc(nr_pages * sizeof(*sglist)); | 72 | sglist = vzalloc(nr_pages * sizeof(*sglist)); |
73 | if (NULL == sglist) | 73 | if (NULL == sglist) |
74 | return NULL; | 74 | return NULL; |
75 | memset(sglist, 0, nr_pages * sizeof(*sglist)); | ||
76 | sg_init_table(sglist, nr_pages); | 75 | sg_init_table(sglist, nr_pages); |
77 | for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { | 76 | for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { |
78 | pg = vmalloc_to_page(virt); | 77 | pg = vmalloc_to_page(virt); |