chiark / gitweb /
virt: Update cache if the detected vm is virtualbox (#5364)
[elogind.git] / src / basic / virt.c
index 66ce7ec..276df83 100644 (file)
@@ -328,8 +328,10 @@ int detect_vm(void) {
          * -> Third try to detect from dmi. */
 
         dmi = detect_vm_dmi();
-        if (dmi == VIRTUALIZATION_ORACLE)
-                return dmi;
+        if (dmi == VIRTUALIZATION_ORACLE) {
+                r = dmi;
+                goto finish;
+        }
 
         r = detect_vm_cpuid();
         if (r < 0)