From 99e9a6721a4033016ca60139cc45be77eee841f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Mon, 15 Mar 2021 10:35:06 +0100 Subject: [PATCH] anv: fix memory allocation error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Coverity. Fixes: 0a7224f3ff7 ("anv: group as many command buffers into a single execbuf") Signed-off-by: Marcin Ĺšlusarz Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index a582de44735..e0688674274 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -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; }