[PATCH] drm/amdgpu: fix err_data null pointer issue in amdgpu_ras.c

Zhang, Hawking Hawking.Zhang at amd.com
Mon Nov 13 06:54:01 UTC 2023


[AMD Official Use Only - General]

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Yang Wang
Sent: Monday, November 13, 2023 14:51
To: amd-gfx at lists.freedesktop.org
Cc: Hawking.zhang at amc.com; Li, Candice <Candice.Li at amd.com>; Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
Subject: [PATCH] drm/amdgpu: fix err_data null pointer issue in amdgpu_ras.c

fix err_data null pointer issue about err_data in amdgpu_ras.c

Fixes: b752e18f33f1 ("drm/amdgpu: Support multiple error query modes")

Signed-off-by: Yang Wang <kevinyang.wang at amd.com>
---
 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 1372380d2423..13ccc4cc36c1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1188,7 +1188,7 @@ static int amdgpu_ras_query_error_status_helper(struct amdgpu_device *adev,
                        }

                        if (block_obj->hw_ops->query_ras_error_count)
-                               block_obj->hw_ops->query_ras_error_count(adev, &err_data);
+                               block_obj->hw_ops->query_ras_error_count(adev, err_data);

                        if ((info->head.block == AMDGPU_RAS_BLOCK__SDMA) ||
                            (info->head.block == AMDGPU_RAS_BLOCK__GFX) ||
--
2.34.1



More information about the amd-gfx mailing list