diff options
-rw-r--r-- | drivers/firmware/efivars.c | 6 |
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: | |||
827 | static void __exit | 827 | static void __exit |
828 | efivars_exit(void) | 828 | efivars_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 | ||
834 | module_init(efivars_init); | 836 | module_init(efivars_init); |