aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/firmware/efivars.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 5d1ec6898e7c..a2d2f1f0d4f3 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -827,8 +827,10 @@ err_put:
827static void __exit 827static void __exit
828efivars_exit(void) 828efivars_exit(void)
829{ 829{
830 unregister_efivars(&__efivars); 830 if (efi_enabled) {
831 kobject_put(efi_kobj); 831 unregister_efivars(&__efivars);
832 kobject_put(efi_kobj);
833 }
832} 834}
833 835
834module_init(efivars_init); 836module_init(efivars_init);