From: Christian König Date: Mon, 5 Aug 2013 12:10:56 +0000 (+0200) Subject: drm/radeon: stop sending invalid UVD destroy msg X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=641a00593f7d07eab778fbabf546fb68fff3d5ce;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/radeon: stop sending invalid UVD destroy msg We also need to check the handle. Signed-off-by: Christian König Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index ca0d7358ed33..4fec195e0dd4 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -235,8 +235,8 @@ void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp) { int i, r; for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) { - if (rdev->uvd.filp[i] == filp) { - uint32_t handle = atomic_read(&rdev->uvd.handles[i]); + uint32_t handle = atomic_read(&rdev->uvd.handles[i]); + if (handle != 0 && rdev->uvd.filp[i] == filp) { struct radeon_fence *fence; r = radeon_uvd_get_destroy_msg(rdev,