diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index 22f2cefb..d0b6c8a8 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c | |||
@@ -231,8 +231,9 @@ int nvgpu_dma_alloc_flags_sys(struct gk20a *g, unsigned long flags, | |||
231 | 231 | ||
232 | nvgpu_dma_flags_to_attrs(&dma_attrs, flags); | 232 | nvgpu_dma_flags_to_attrs(&dma_attrs, flags); |
233 | 233 | ||
234 | alloc_ret = dma_alloc_attrs(d, size, &iova, GFP_KERNEL, | 234 | alloc_ret = dma_alloc_attrs(d, size, &iova, |
235 | __DMA_ATTR(dma_attrs)); | 235 | GFP_KERNEL|__GFP_ZERO, |
236 | __DMA_ATTR(dma_attrs)); | ||
236 | if (!alloc_ret) | 237 | if (!alloc_ret) |
237 | return -ENOMEM; | 238 | return -ENOMEM; |
238 | 239 | ||
@@ -245,7 +246,6 @@ int nvgpu_dma_alloc_flags_sys(struct gk20a *g, unsigned long flags, | |||
245 | mem->cpu_va = alloc_ret; | 246 | mem->cpu_va = alloc_ret; |
246 | err = nvgpu_get_sgtable_attrs(g, &mem->priv.sgt, mem->cpu_va, | 247 | err = nvgpu_get_sgtable_attrs(g, &mem->priv.sgt, mem->cpu_va, |
247 | iova, size, flags); | 248 | iova, size, flags); |
248 | memset(mem->cpu_va, 0, size); | ||
249 | } | 249 | } |
250 | if (err) | 250 | if (err) |
251 | goto fail_free; | 251 | goto fail_free; |