diff options
Diffstat (limited to 'drivers/firmware/efi/efi.c')
-rw-r--r-- | drivers/firmware/efi/efi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index ca617f40574a..d6144e3b97c5 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c | |||
@@ -58,6 +58,11 @@ bool efi_runtime_disabled(void) | |||
58 | 58 | ||
59 | static int __init parse_efi_cmdline(char *str) | 59 | static int __init parse_efi_cmdline(char *str) |
60 | { | 60 | { |
61 | if (!str) { | ||
62 | pr_warn("need at least one option\n"); | ||
63 | return -EINVAL; | ||
64 | } | ||
65 | |||
61 | if (parse_option_str(str, "noruntime")) | 66 | if (parse_option_str(str, "noruntime")) |
62 | disable_runtime = true; | 67 | disable_runtime = true; |
63 | 68 | ||
@@ -66,7 +71,6 @@ static int __init parse_efi_cmdline(char *str) | |||
66 | early_param("efi", parse_efi_cmdline); | 71 | early_param("efi", parse_efi_cmdline); |
67 | 72 | ||
68 | struct kobject *efi_kobj; | 73 | struct kobject *efi_kobj; |
69 | static struct kobject *efivars_kobj; | ||
70 | 74 | ||
71 | /* | 75 | /* |
72 | * Let's not leave out systab information that snuck into | 76 | * Let's not leave out systab information that snuck into |
@@ -218,10 +222,9 @@ static int __init efisubsys_init(void) | |||
218 | goto err_remove_group; | 222 | goto err_remove_group; |
219 | 223 | ||
220 | /* and the standard mountpoint for efivarfs */ | 224 | /* and the standard mountpoint for efivarfs */ |
221 | efivars_kobj = kobject_create_and_add("efivars", efi_kobj); | 225 | error = sysfs_create_mount_point(efi_kobj, "efivars"); |
222 | if (!efivars_kobj) { | 226 | if (error) { |
223 | pr_err("efivars: Subsystem registration failed.\n"); | 227 | pr_err("efivars: Subsystem registration failed.\n"); |
224 | error = -ENOMEM; | ||
225 | goto err_remove_group; | 228 | goto err_remove_group; |
226 | } | 229 | } |
227 | 230 | ||