summaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-05 00:07:39 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:16:44 -0200
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)
/* create frame buffers, and make circular ring */
for (i = 0; i < default_fbufs; i++) {
if (pdev->fbuf[i].data == NULL) {
- kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */
+ kbuf = vzalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */
if (kbuf == NULL) {
PWC_ERROR("Failed to allocate frame buffer %d.\n", i);
return -ENOMEM;
}
PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf);
pdev->fbuf[i].data = kbuf;
- memset(kbuf, 0, PWC_FRAME_SIZE);
}
}