Skip to contentSkip to conversation

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

PATCH In review Yang Wang 2 participants 2 messages Nov 13, 2023

Subsystems (2)
lore
Share & tools
lore

Yang Wang

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index 1372380d2423..13ccc4cc36c1 100644
@@ -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) ||
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Yang Wang
Sent: Monday, November 13, 2023 14:51
To: [email protected]
Cc: [email protected]; Li, Candice <[email protected]>; Wang, Yang(Kevin) <[email protected]>
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")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index 1372380d2423..13ccc4cc36c1 100644
@@ -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