Skip to content

Commit 290be0a

Browse files
committed
Merge branch 'efi/next' into efi/urgent
2 parents c3f38fa + 7c23b18 commit 290be0a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/firmware/efi/efi-pstore.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int efi_pstore_read_func(struct pstore_record *record,
136136
&size, record->buf);
137137
if (status != EFI_SUCCESS) {
138138
kfree(record->buf);
139-
return -EIO;
139+
return efi_status_to_err(status);
140140
}
141141

142142
/*
@@ -189,7 +189,7 @@ static ssize_t efi_pstore_read(struct pstore_record *record)
189189
return 0;
190190

191191
if (status != EFI_SUCCESS)
192-
return -EIO;
192+
return efi_status_to_err(status);
193193

194194
/* skip variables that don't concern us */
195195
if (efi_guidcmp(guid, LINUX_EFI_CRASH_GUID))
@@ -227,7 +227,7 @@ static int efi_pstore_write(struct pstore_record *record)
227227
record->size, record->psi->buf,
228228
true);
229229
efivar_unlock();
230-
return status == EFI_SUCCESS ? 0 : -EIO;
230+
return efi_status_to_err(status);
231231
};
232232

233233
static int efi_pstore_erase(struct pstore_record *record)
@@ -238,7 +238,7 @@ static int efi_pstore_erase(struct pstore_record *record)
238238
PSTORE_EFI_ATTRIBUTES, 0, NULL);
239239

240240
if (status != EFI_SUCCESS && status != EFI_NOT_FOUND)
241-
return -EIO;
241+
return efi_status_to_err(status);
242242
return 0;
243243
}
244244

drivers/firmware/efi/libstub/zboot.lds

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ SECTIONS
4141
}
4242

4343
/DISCARD/ : {
44+
*(.discard .discard.*)
4445
*(.modinfo .init.modinfo)
4546
}
4647
}

0 commit comments

Comments
 (0)