|
@@ -287,14 +287,13 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
|
|
/* create frame buffers, and make circular ring */
|
|
/* create frame buffers, and make circular ring */
|
|
for (i = 0; i < default_fbufs; i++) {
|
|
for (i = 0; i < default_fbufs; i++) {
|
|
if (pdev->fbuf[i].data == NULL) {
|
|
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) {
|
|
if (kbuf == NULL) {
|
|
PWC_ERROR("Failed to allocate frame buffer %d.\n", i);
|
|
PWC_ERROR("Failed to allocate frame buffer %d.\n", i);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf);
|
|
PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf);
|
|
pdev->fbuf[i].data = kbuf;
|
|
pdev->fbuf[i].data = kbuf;
|
|
- memset(kbuf, 0, PWC_FRAME_SIZE);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|