aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/efivars.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/efivars.c')
-rw-r--r--drivers/firmware/efi/efivars.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
index b623c599e572..8bd1bb6dbe47 100644
--- a/drivers/firmware/efi/efivars.c
+++ b/drivers/firmware/efi/efivars.c
@@ -523,13 +523,11 @@ static void efivar_update_sysfs_entries(struct work_struct *work)
523 struct efivar_entry *entry; 523 struct efivar_entry *entry;
524 int err; 524 int err;
525 525
526 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
527 if (!entry)
528 return;
529
530 /* Add new sysfs entries */ 526 /* Add new sysfs entries */
531 while (1) { 527 while (1) {
532 memset(entry, 0, sizeof(*entry)); 528 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
529 if (!entry)
530 return;
533 531
534 err = efivar_init(efivar_update_sysfs_entry, entry, 532 err = efivar_init(efivar_update_sysfs_entry, entry,
535 true, false, &efivar_sysfs_list); 533 true, false, &efivar_sysfs_list);