Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: check save count before RAS bad page saving

It's possible that unit_num is larger than 0 but save_count is zero,
since we do get bad page address but the address is invalid. Check
unit_num and save_count together.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Candice Li <candice.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tao Zhou and committed by
Alex Deucher
036f18d0 d5a62b7a

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
··· 3142 3142 *new_cnt = unit_num; 3143 3143 3144 3144 /* only new entries are saved */ 3145 - if (unit_num > 0) { 3145 + if (unit_num && save_count) { 3146 3146 /*old asics only save pa to eeprom like before*/ 3147 3147 if (IP_VERSION_MAJ(amdgpu_ip_version(adev, UMC_HWIP, 0)) < 12) { 3148 3148 if (amdgpu_ras_eeprom_append(control,