[PATCH] drm/amdgpu: Release the correct object on error in amdgpu_benchmark_move()

Dan Carpenter dan.carpenter at oracle.com
Fri Nov 15 07:27:40 UTC 2019


There is a typo so this unreserves "sobj" instead of "dobj".

Fixes: bb812f1ea87d ("drm/amdgpu: allocate gart memory when it's required (v3)")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
>From static analysis.  Not tested.

 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
index d1495e1c9289..43d9d03bc7e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
@@ -114,7 +114,7 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size,
 		goto out_cleanup;
 	r = amdgpu_bo_pin(dobj, ddomain);
 	if (r) {
-		amdgpu_bo_unreserve(sobj);
+		amdgpu_bo_unreserve(dobj);
 		goto out_cleanup;
 	}
 	r = amdgpu_ttm_alloc_gart(&dobj->tbo);
-- 
2.11.0



More information about the amd-gfx mailing list