summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2014-10-16 12:00:09 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:46 -0400
commit0858058e50891e81b2f5d50d73951f47eee101e7 (patch)
tree73e577d1b3eb1c6c3e19e79c95f2381bb0f53238 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parentc0b619c3cd6da315f22e0506e89530ae7b594d6d (diff)
gpu: nvgpu: Report error on failed map
gk20a_vm_map_buffer() used to ignore silently map requests for non-dmabuf fd:s. Fix this by returning the error code from dma_buf_get(). Bug 1566862 Change-Id: If01b03f43b67b17d9fb997d914db871520f50c6e Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index dd23023b..b6a556ac 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -2607,7 +2607,7 @@ int gk20a_vm_map_buffer(struct gk20a_as_share *as_share,
2607 /* get ref to the mem handle (released on unmap_locked) */ 2607 /* get ref to the mem handle (released on unmap_locked) */
2608 dmabuf = dma_buf_get(dmabuf_fd); 2608 dmabuf = dma_buf_get(dmabuf_fd);
2609 if (IS_ERR(dmabuf)) 2609 if (IS_ERR(dmabuf))
2610 return 0; 2610 return PTR_ERR(dmabuf);
2611 2611
2612 err = gk20a_dmabuf_alloc_drvdata(dmabuf, dev_from_vm(vm)); 2612 err = gk20a_dmabuf_alloc_drvdata(dmabuf, dev_from_vm(vm));
2613 if (err) { 2613 if (err) {