kvm: handle errors of updateSystemValues

PiperOrigin-RevId: 441390130
This commit is contained in:
Andrei Vagin
2022-04-12 23:32:59 -07:00
committed by gVisor bot
parent d7bef9586b
commit edbd203027
+4 -2
View File
@@ -219,7 +219,9 @@ func (c *cpuidEntries) Set(in cpuid.In, out cpuid.Out) {
// updateGlobalOnce does global initialization. It has to be called only once.
func updateGlobalOnce(fd int) error {
err := updateSystemValues(int(fd))
if err := updateSystemValues(int(fd)); err != nil {
return err
}
fs := cpuid.FeatureSet{
Function: &cpuidSupported,
}
@@ -238,5 +240,5 @@ func updateGlobalOnce(fd int) error {
Function: s,
})
physicalInit()
return err
return nil
}