aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-04 23:07:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:44 -0500
commit101b25b55ec48354bc40b9102b4f7922c9ad9eae (patch)
tree9a409a45c0c7ff943cccf02c9f494119c97e2153 /drivers/media/video/pwc
parent42e142f6b72493b5daec9950c4c83d20ccf56a0d (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/pwc')
-rw-r--r--drivers/media/video/pwc/pwc-if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index f3dc89da4c4e..b821065e3870 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -287,14 +287,13 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
287 /* create frame buffers, and make circular ring */ 287 /* create frame buffers, and make circular ring */
288 for (i = 0; i < default_fbufs; i++) { 288 for (i = 0; i < default_fbufs; i++) {
289 if (pdev->fbuf[i].data == NULL) { 289 if (pdev->fbuf[i].data == NULL) {
290 kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */ 290 kbuf = vzalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */
291 if (kbuf == NULL) { 291 if (kbuf == NULL) {
292 PWC_ERROR("Failed to allocate frame buffer %d.\n", i); 292 PWC_ERROR("Failed to allocate frame buffer %d.\n", i);
293 return -ENOMEM; 293 return -ENOMEM;
294 } 294 }
295 PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf); 295 PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf);
296 pdev->fbuf[i].data = kbuf; 296 pdev->fbuf[i].data = kbuf;
297 memset(kbuf, 0, PWC_FRAME_SIZE);
298 } 297 }
299 } 298 }
300 299