mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-25 07:21:20 -04:00
Host driver determines the bad_page_status, not VF. VFs do not have access to the EEPROM, and eeprom_init is skipped. However, check_bad_page_status is called outside of the eeprom_init sequence without any is_vf checks. Add a return false in __is_ras_eeprom_supported for VFs, and use that guard in amdgpu_ras_check_bad_page_status to prevent incorrect access to un-initialized eeprom_control object. Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>