diff options
author | Dave Airlie <[email protected]> | 2017-06-13 05:48:40 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-06-13 09:30:19 +1000 |
commit | b9e76b0c4473b8f3ec2ac8208e1cd86852b5fb52 (patch) | |
tree | 2d5e874d0febdcb078cb9b556ca8bfc3eaf929eb /src | |
parent | 8ec4975cd83365c791a1852a6515ed5d4ade2daf (diff) |
radv: return correct error on invalid handle from vkAllocateMemory
Coverity pointed out this was returning uninitialised.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 1ea69608a14..427d35769d9 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -2108,9 +2108,10 @@ VkResult radv_AllocateMemory( VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX); mem->bo = device->ws->buffer_from_fd(device->ws, import_info->fd, NULL, NULL); - if (!mem->bo) + if (!mem->bo) { + result = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX; goto fail; - else + } else goto out_success; } |