diff options
author | Joe Perches <joe@perches.com> | 2010-11-04 23:07:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:44 -0500 |
commit | 101b25b55ec48354bc40b9102b4f7922c9ad9eae (patch) | |
tree | 9a409a45c0c7ff943cccf02c9f494119c97e2153 /drivers/media/video/videobuf-dma-sg.c | |
parent | 42e142f6b72493b5daec9950c4c83d20ccf56a0d (diff) |
[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.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); |