anv: fix uninitialized return value

We don't go through the loop when there are no queues.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 884df891d7 ("anv: allow device creation with no queue")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36910>
(cherry picked from commit 1bab95551a)
This commit is contained in:
Lionel Landwerlin 2025-08-21 17:58:19 +03:00 committed by Eric Engestrom
parent e281b37c6f
commit 04fc414ea7
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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++) {