udev-builtin-kmod: log about unloading only when already loaded

This commit is contained in:
Yu Watanabe
2024-12-14 11:29:05 +09:00
parent 9c6c4ad173
commit 46d9f19465
+1 -2
View File
@@ -68,11 +68,10 @@ static int builtin_kmod_init(void) {
/* called on udev shutdown and reload request */
static void builtin_kmod_exit(void) {
log_debug("Unload kernel module index.");
if (!ctx)
return;
log_debug("Unload kernel module index.");
ctx = sym_kmod_unref(ctx);
}