drm/amd/amdgpu: fix locking in bo creation error path
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 10 Jan 2017 19:36:56 +0000 (20:36 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:29 +0000 (11:13 -0500)
commitf1543f58cbc7f62c4ea0cca57bbb4a95dc752264
tree3480c1f26eab6e82f0869ccca7b6b378bf570461
parent36ea83d1512008ab6631c54971e8de8cf2f0a7b4
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: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c