diff options
-rw-r--r-- | drivers/firmware/efivars.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 182ce9471175..f4baa11d3644 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -1628,10 +1628,11 @@ static ssize_t efivar_delete(struct file *filp, struct kobject *kobj, | |||
1628 | return count; | 1628 | return count; |
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | static bool variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor) | 1631 | static bool variable_is_present(struct efivars *efivars, |
1632 | efi_char16_t *variable_name, | ||
1633 | efi_guid_t *vendor) | ||
1632 | { | 1634 | { |
1633 | struct efivar_entry *entry, *n; | 1635 | struct efivar_entry *entry, *n; |
1634 | struct efivars *efivars = &__efivars; | ||
1635 | unsigned long strsize1, strsize2; | 1636 | unsigned long strsize1, strsize2; |
1636 | bool found = false; | 1637 | bool found = false; |
1637 | 1638 | ||
@@ -1703,8 +1704,8 @@ static void efivar_update_sysfs_entries(struct work_struct *work) | |||
1703 | if (status != EFI_SUCCESS) { | 1704 | if (status != EFI_SUCCESS) { |
1704 | break; | 1705 | break; |
1705 | } else { | 1706 | } else { |
1706 | if (!variable_is_present(variable_name, | 1707 | if (!variable_is_present(efivars, |
1707 | &vendor)) { | 1708 | variable_name, &vendor)) { |
1708 | found = true; | 1709 | found = true; |
1709 | break; | 1710 | break; |
1710 | } | 1711 | } |
@@ -2008,7 +2009,8 @@ int register_efivars(struct efivars *efivars, | |||
2008 | * we'll ever see a different variable name, | 2009 | * we'll ever see a different variable name, |
2009 | * and may end up looping here forever. | 2010 | * and may end up looping here forever. |
2010 | */ | 2011 | */ |
2011 | if (variable_is_present(variable_name, &vendor_guid)) { | 2012 | if (variable_is_present(efivars, variable_name, |
2013 | &vendor_guid)) { | ||
2012 | dup_variable_bug(variable_name, &vendor_guid, | 2014 | dup_variable_bug(variable_name, &vendor_guid, |
2013 | variable_name_size); | 2015 | variable_name_size); |
2014 | status = EFI_NOT_FOUND; | 2016 | status = EFI_NOT_FOUND; |