tu: Fix missing unlock

Fix defect reported by Coverity Scan.

Missing unlock (LOCK)
missing_unlock: Returning without unlocking dev->vma_mutex.

Fixes: c20139c292 ("tu: Enable bufferDeviceAddressCaptureReplay")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23490>
(cherry picked from commit 46764815ac)
This commit is contained in:
Vinson Lee 2023-06-06 23:34:31 -07:00 committed by Eric Engestrom
parent 5300cff16c
commit b98eb78f58
2 changed files with 2 additions and 1 deletions

View file

@ -8590,7 +8590,7 @@
"description": "tu: Fix missing unlock",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c20139c2922276238c12dc6a6cf0fbbc39e9d732"
},

View file

@ -267,6 +267,7 @@ tu_allocate_userspace_iova(struct tu_device *dev,
size)) {
*iova = client_iova;
} else {
mtx_unlock(&dev->physical_device->vma_mutex);
return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS;
}
} else {