aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_gem.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-07 17:24:24 -0800
committerJason Ekstrand <[email protected]>2016-11-09 18:17:48 -0800
commit920f34a2d9f14f023aee5203baa110c971519ee8 (patch)
treeb3c6ea4da614997bc24afec739d7c7974b164d06 /src/intel/vulkan/anv_gem.c
parent73ef9c8f047835d369db3646853cdb25442db8d3 (diff)
anv/device: Return the right error for failed maps
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0 13.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_gem.c')
-rw-r--r--src/intel/vulkan/anv_gem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
index e65468954a2..0dde6d9d671 100644
--- a/src/intel/vulkan/anv_gem.c
+++ b/src/intel/vulkan/anv_gem.c
@@ -88,10 +88,8 @@ anv_gem_mmap(struct anv_device *device, uint32_t gem_handle,
};
int ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_MMAP, &gem_mmap);
- if (ret != 0) {
- /* FIXME: Is NULL the right error return? Cf MAP_INVALID */
- return NULL;
- }
+ if (ret != 0)
+ return MAP_FAILED;
VG(VALGRIND_MALLOCLIKE_BLOCK(gem_mmap.addr_ptr, gem_mmap.size, 0, 1));
return (void *)(uintptr_t) gem_mmap.addr_ptr;