drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep
authorChristian König <christian.koenig@amd.com>
Tue, 30 Jul 2019 09:17:03 +0000 (11:17 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Jul 2019 06:26:09 +0000 (01:26 -0500)
commit67d0859e2758ef992fd32499747ce4b1038a63c0
tree140cdd0ac457f2e39cbb12bf82a03cc35b4c01c3
parentf0bc1ee473fefd4d9f2ace9fad1cefdc0b7f6fdd
drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep

We always need to drop the ctx reference and should check
for errors first and then dereference the fence pointer.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c