Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1543f58 authored by Nicolai Hähnle's avatar Nicolai Hähnle Committed by Alex Deucher
Browse files

drm/amd/amdgpu: fix locking in bo creation error path



Unlock the resv lock only if we were the ones to lock it in the first
place.

Signed-off-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: default avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 36ea83d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
	return 0;

fail_unreserve:
	if (!resv)
		ww_mutex_unlock(&bo->tbo.resv->lock);
	amdgpu_bo_unref(&bo);
	return r;