aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
diff options
context:
space:
mode:
authorJinzhou Su <[email protected]>2024-12-02 03:14:40 +0000
committerAlex Deucher <[email protected]>2024-12-10 15:26:50 +0000
commit9db3aed8ea22415706db76c2857fe88c37357f8d (patch)
tree679725e88009c4c23e42b1ba217fa4a9ab87eb3e /drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
parentdrm/amd: Add Suspend/Hibernate notification callback support (diff)
downloadkernel-9db3aed8ea22415706db76c2857fe88c37357f8d.tar.gz
kernel-9db3aed8ea22415706db76c2857fe88c37357f8d.zip
drm/amdgpu: return error when eeprom checksum failed
Return eeprom table checksum error result, otherwise it might be overwritten by next call. V2: replace DRM_ERROR with dev_err Signed-off-by: Jinzhou Su <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index f4a9e15389ae..bd8acb55f76f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -1412,9 +1412,11 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)
}
res = __verify_ras_table_checksum(control);
- if (res)
- DRM_ERROR("RAS Table incorrect checksum or error:%d\n",
+ if (res) {
+ dev_err(adev->dev, "RAS Table incorrect checksum or error:%d\n",
res);
+ return -EINVAL;
+ }
if (ras->bad_page_cnt_threshold > control->ras_num_recs) {
/* This means that, the threshold was increased since
* the last time the system was booted, and now,