]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/media/video/pwc/pwc-if.c
[media] drivers/media: Use vzalloc
[linux-beck.git] / drivers / media / video / pwc / pwc-if.c
index f3dc89da4c4eefcd23f7c457c75322c5eb96b0c9..b821065e387057358c3e08965186f05472e5551d 100644 (file)
@@ -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);
                }
        }