drm/amdgpu: Fix memory trashing if UVD ring test fails
authorJay Cornwall <jay@jcornwall.me>
Wed, 3 Aug 2016 18:39:42 +0000 (13:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Aug 2016 16:11:48 +0000 (12:11 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

index b11f4e8..4aa993d 100644 (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;
 }