From 04fc414ea7f44c4c502bb3c0d2567b4fe98f0ffb Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 21 Aug 2025 17:58:19 +0300 Subject: [PATCH] anv: fix uninitialized return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't go through the loop when there are no queues. Signed-off-by: Lionel Landwerlin Fixes: 884df891d7 ("anv: allow device creation with no queue") Reviewed-by: Tapani Pälli Part-of: (cherry picked from commit 1bab95551a348173aba950bfc7696deecff1b9a1) --- .pick_status.json | 2 +- src/intel/vulkan/genX_init_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 62e80a4fe36..d67f7fb292d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6974,7 +6974,7 @@ "description": "anv: fix uninitialized return value", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "884df891d791bd35eb87a3aefbb50a4662be1267", "notes": null diff --git a/src/intel/vulkan/genX_init_state.c b/src/intel/vulkan/genX_init_state.c index 6075568991b..8c533c87070 100644 --- a/src/intel/vulkan/genX_init_state.c +++ b/src/intel/vulkan/genX_init_state.c @@ -918,7 +918,7 @@ genX(init_physical_device_state)(ASSERTED struct anv_physical_device *pdevice) VkResult genX(init_device_state)(struct anv_device *device) { - VkResult res; + VkResult res = VK_SUCCESS; device->slice_hash = (struct anv_state) { 0 }; for (uint32_t i = 0; i < device->queue_count; i++) {