Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Real return value can be over-written when clean up

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Xie and committed by
Alex Deucher
d159f26c f3aa745e

+5 -4
+5 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
··· 117 117 } 118 118 119 119 out_cleanup: 120 + /* Check error value now. The value can be overwritten when clean up.*/ 121 + if (r) { 122 + DRM_ERROR("Error while benchmarking BO move.\n"); 123 + } 124 + 120 125 if (sobj) { 121 126 r = amdgpu_bo_reserve(sobj, false); 122 127 if (likely(r == 0)) { ··· 137 132 amdgpu_bo_unreserve(dobj); 138 133 } 139 134 amdgpu_bo_unref(&dobj); 140 - } 141 - 142 - if (r) { 143 - DRM_ERROR("Error while benchmarking BO move.\n"); 144 135 } 145 136 } 146 137