[PATCH 6.19 426/844] drm/amdgpu: return when ras table checksum is error

From: Sasha Levin

Date: Sat Feb 28 2026 - 15:13:01 EST


From: Gangliang Xie <ganglxie@xxxxxxx>

[ Upstream commit 044f8d3b1fac6ac89c560f61415000e6bdab3a03 ]

end the function flow when ras table checksum is error

Signed-off-by: Gangliang Xie <ganglxie@xxxxxxx>
Reviewed-by: Tao Zhou <tao.zhou1@xxxxxxx>
Reviewed-by: Kent Russell <kent.russell@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index 64dd7a81bff5f..710a8fe79fccd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -1701,10 +1701,12 @@ int amdgpu_ras_eeprom_check(struct amdgpu_ras_eeprom_control *control)
}

res = __verify_ras_table_checksum(control);
- if (res)
+ if (res) {
dev_err(adev->dev,
"RAS table incorrect checksum or error:%d\n",
res);
+ return -EINVAL;
+ }

/* Warn if we are at 90% of the threshold or above
*/
--
2.51.0