guarantee bo pointers in bad page bo array are NULL after allocation
Signed-off-by: Tao Zhou <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 3f2a2f13e4c6..d1bafa92ca91 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1310,7 +1310,7 @@ static int amdgpu_ras_realloc_eh_data_space(struct
amdgpu_device *adev,
unsigned int align_space = ALIGN(new_space, 512);
void *bps = kmalloc(align_space * sizeof(*data->bps), GFP_KERNEL);
struct amdgpu_bo **bps_bo =
- kmalloc(align_space * sizeof(*data->bps_bo),
GFP_KERNEL);
+ kzalloc(align_space * sizeof(*data->bps_bo),
GFP_KERNEL);
if (!bps || !bps_bo) {
kfree(bps);
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx