The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=99afbc5cc7ae8ba7b112fbafbf24ea2575a65ba4
commit 99afbc5cc7ae8ba7b112fbafbf24ea2575a65ba4 Author: Mark Johnston <[email protected]> AuthorDate: 2026-01-19 14:29:33 +0000 Commit: Mark Johnston <[email protected]> CommitDate: 2026-01-19 14:29:33 +0000 vmm: Avoid clobbering errors from vmm_modinit() Reported by: novel Reviewed by: bnovkov Fixes: e758074458df ("vmm: Move the module load handler to vmm_dev.c") Differential Revision: https://reviews.freebsd.org/D54750 --- sys/dev/vmm/vmm_dev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index a5322f05d28f..fa51dc950459 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -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:
