amdgpu: Unlock mutex if base_required is invalid
In the function amdgpu_vamgr_find_va() the function would return without unlocking the mutex if the base_required offset was below the va managers base offset. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>main
parent
c745e541a9
commit
988f31ecc2
|
@ -124,8 +124,10 @@ amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
|
|||
}
|
||||
|
||||
if (base_required) {
|
||||
if (base_required < mgr->va_offset)
|
||||
if (base_required < mgr->va_offset) {
|
||||
pthread_mutex_unlock(&mgr->bo_va_mutex);
|
||||
return AMDGPU_INVALID_VA_ADDRESS;
|
||||
}
|
||||
offset = mgr->va_offset;
|
||||
waste = base_required - mgr->va_offset;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue