diff --git a/src/efivar.c b/src/efivar.c index e335a6b9..1f9d6139 100644 --- a/src/efivar.c +++ b/src/efivar.c @@ -355,14 +355,8 @@ edit_variable(const char *guid_name, void *data, size_t data_size, exit(1); } - rc = efi_get_variable(guid, name, &old_data, &old_data_size, - &old_attributes); - if (rc < 0 && edit_type != EDIT_WRITE) { - fprintf(stderr, "efivar: %m\n"); - show_errors(); - exit(1); - } - + rc = efi_get_variable(guid, name, &old_data, &old_data_size, &old_attributes); + /* Ignore errors, as -a can be used to create a variable */ if (attrib != 0) old_attributes = attrib;