drm/amdgpu: Fix memory trashing if UVD ring test fails

fence_put was called on an uninitialized variable.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jay Cornwall <jay@jcornwall.me>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jay Cornwall 2016-08-03 13:39:42 -05:00 committed by Alex Deucher
parent 64827adc9e
commit c2a4c5b75a
1 changed files with 2 additions and 1 deletions

View File

@ -1187,7 +1187,8 @@ int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout)
r = 0;
}
error:
fence_put(fence);
error:
return r;
}