diff options
author | Hiroshi DOYU <hdoyu@nvidia.com> | 2012-01-16 10:57:46 +0200 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-01-23 06:20:45 -0800 |
commit | 5bb2e126b8063a680c149dc205fce4ac6def5695 (patch) | |
tree | 229b39d591ae4ec42b32caa0b765d8a0a9756d43 /drivers/gpu | |
parent | 9052e70772dde6f94efb8e9c77bdddfdaec0df21 (diff) |
gpu: ion: Replace vmalloc() with vzalloc()
Use vzalloc() instead of vmalloc() + memset(,0,).
Change-Id: I24a10114a325bf94c4cb0131eaf3dcd2f901e023
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/75532
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/ion/ion_iommu_heap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/ion/ion_iommu_heap.c b/drivers/gpu/ion/ion_iommu_heap.c index af5d0d144c39..582146435644 100644 --- a/drivers/gpu/ion/ion_iommu_heap.c +++ b/drivers/gpu/ion/ion_iommu_heap.c @@ -105,11 +105,10 @@ static int ion_buffer_allocate(struct ion_buffer *buf) if (!buf->pages) goto err_pages; - buf->sglist = vmalloc(npages * sizeof(*buf->sglist)); + buf->sglist = vzalloc(npages * sizeof(*buf->sglist)); if (!buf->sglist) goto err_sgl; - memset(buf->sglist, 0, npages * sizeof(*buf->sglist)); sg_init_table(buf->sglist, npages); for (i = 0; i < npages; i++) { |