hwpstate_intel: don't unconditionally print the error message

Actually check the wrmsr_safe() return value when setting autonomous
HWP for package.

PR:		245582
Differential Revision:	https://reviews.freebsd.org/D24744
This commit is contained in:
yuripv 2020-11-29 01:43:04 +00:00
parent 9452221f13
commit 64304dc353

View File

@ -461,8 +461,10 @@ set_autonomous_hwp(struct hwp_softc *sc)
* not exist." (Intel SDM §14.4.4)
*/
ret = wrmsr_safe(MSR_IA32_HWP_REQUEST_PKG, sc->req);
device_printf(dev,
"Failed to set autonomous HWP for package\n");
if (ret) {
device_printf(dev,
"Failed to set autonomous HWP for package\n");
}
}
out: