[PATCH 1/2] drm/amdgpu: initialize bo in ras_reserve_bad_pages

Zhou1, Tao Tao.Zhou1 at amd.com
Tue Sep 17 06:16:59 UTC 2019


the bo pointer is reused for bad pages, initialize it in each loop

Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 5f623daf5078..090daf595469 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1421,6 +1421,7 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 
 		data->bps_bo[i] = bo;
 		data->last_reserved = i + 1;
+		bo = NULL;
 	}
 
 	/* continue to save bad pages to eeprom even reesrve_vram fails */
-- 
2.17.1



More information about the amd-gfx mailing list