The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eeff383ba634e2496f67949254a2a8432c8f0582
commit eeff383ba634e2496f67949254a2a8432c8f0582 Author: Mark Johnston <[email protected]> AuthorDate: 2026-01-19 14:29:33 +0000 Commit: Mark Johnston <[email protected]> CommitDate: 2026-06-25 15:33:48 +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 (cherry picked from commit 99afbc5cc7ae8ba7b112fbafbf24ea2575a65ba4) --- 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 625a6dce9465..302a73be25b8 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -1151,9 +1151,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:
