vmm: Avoid clobbering errors from vmm_modinit()

Reported by:	novel
Reviewed by:	bnovkov
Fixes:		e758074458 ("vmm: Move the module load handler to vmm_dev.c")
Differential Revision:	https://reviews.freebsd.org/D54750
This commit is contained in:
Mark Johnston
2026-01-19 14:29:33 +00:00
parent a2c87d4f88
commit 99afbc5cc7
+5 -3
View File
@@ -1228,9 +1228,11 @@ vmm_handler(module_t mod, int what, void *arg)
if (error == 0)
vmm_initialized = true;
else {
error = vmmdev_cleanup();
KASSERT(error == 0,
("%s: vmmdev_cleanup failed: %d", __func__, error));
int error1 __diagused;
error1 = vmmdev_cleanup();
KASSERT(error1 == 0,
("%s: vmmdev_cleanup failed: %d", __func__, error1));
}
break;
case MOD_UNLOAD: