⬢ DragonFlyBSD Kernel Audit
DF-3623 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/drm/amd/amdgpu/ci_dpm.c
+++ b/sys/dev/drm/amd/amdgpu/ci_dpm.c
@@ -5879,6 +5879,12 @@ static int ci_dpm_init(struct amdgpu_dev
 	ret = ci_parse_power_table(adev);
 	if (ret) {
 		ci_dpm_fini(adev);
 		return ret;
 	}
+
+	if (!adev->pm.dpm.boot_ps) {
+		DRM_ERROR("no boot state in the VBIOS power table\n");
+		ci_dpm_fini(adev);
+		return -EINVAL;
+	}
 
 	pi->dll_default_on = false;
 	pi->sram_end = SMC_RAM_END;