summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/via/via_dmablit.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-05 06:07:34 +0300
committerDave Airlie <airlied@redhat.com>2010-11-09 06:41:35 +0300
commitec3789ccccc4ded3b136ea93dec94b764b014525 (patch)
tree41439c65d529e1d6ea08a602d7172ef49e9fbe17 /drivers/gpu/drm/via/via_dmablit.c
parent1ef0724dbd9c9e6f421a8987f58b8e034da43ec2 (diff)
downloadlinux-ec3789ccccc4ded3b136ea93dec94b764b014525.tar.xz
drivers/gpu: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/via/via_dmablit.c')
-rw-r--r--drivers/gpu/drm/via/via_dmablit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c
index 9b5b4d9dd62c..3e038a394c51 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
+++ b/drivers/gpu/drm/via/via_dmablit.c
@@ -235,9 +235,9 @@ via_lock_all_dma_pages(drm_via_sg_info_t *vsg, drm_via_dmablit_t *xfer)
vsg->num_pages = VIA_PFN(xfer->mem_addr + (xfer->num_lines * xfer->mem_stride - 1)) -
first_pfn + 1;
- if (NULL == (vsg->pages = vmalloc(sizeof(struct page *) * vsg->num_pages)))
+ vsg->pages = vzalloc(sizeof(struct page *) * vsg->num_pages);
+ if (NULL == vsg->pages)
return -ENOMEM;
- memset(vsg->pages, 0, sizeof(struct page *) * vsg->num_pages);
down_read(&current->mm->mmap_sem);
ret = get_user_pages(current, current->mm,
(unsigned long)xfer->mem_addr,