anv: fix memory allocation error handling

Reported by Coverity.

Fixes: 0a7224f3ff ("anv: group as many command buffers into a single execbuf")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9596>
This commit is contained in:
Marcin Ślusarz 2021-03-15 10:35:06 +01:00
parent 87966b0aa0
commit 99e9a6721a
1 changed files with 1 additions and 1 deletions

View File

@ -1290,7 +1290,7 @@ anv_queue_submit_post_and_alloc_new(struct anv_queue *queue,
return result;
*submit = anv_queue_submit_alloc(queue->device, perf_pass);
if (!submit)
if (!*submit)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
return VK_SUCCESS;
}