mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
efi_init() might return error after initializing the mutex, in which case MOD_UNLOAD() is not processed, and the mutex is not destroyed. Similarly, efi_uninit() skips any processing if efi_runtime was left as NULL, leaving mutex not destroyed. Initialize the mutex in MOD_LOAD case, and destroy in MOD_UNLOAD, also handling errors. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57704