drm/amdgpu: return when ras table checksum is error
authorGangliang Xie <ganglxie@amd.com>
Mon, 9 Feb 2026 09:32:00 +0000 (17:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Feb 2026 20:21:56 +0000 (15:21 -0500)
end the function flow when ras table checksum is error

Signed-off-by: Gangliang Xie <ganglxie@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c

index 2c5d7f8..6fba9d5 100644 (file)
@@ -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
                 */