aboutsummaryrefslogtreecommitdiff
path: root/disk/part_efi.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-05-09 21:35:44 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-05-28 10:59:27 +0200
commit1291c2d446e193824b0952e46dacbd2ea6da62ea (patch)
tree9c127b23e07ebd1525a7cc5f949268ede167ac83 /disk/part_efi.c
parent4fe629d2e8bbda5f265e870d771b92be26e885f6 (diff)
downloadu-boot-1291c2d446e193824b0952e46dacbd2ea6da62ea.zip
u-boot-1291c2d446e193824b0952e46dacbd2ea6da62ea.tar.gz
u-boot-1291c2d446e193824b0952e46dacbd2ea6da62ea.tar.bz2
disk: incorrect message in is_gpt_valid()
alloc_read_gpt_entries() writes differentiated error messages. The caller is_gpt_valid() should not write an extra possibly wrong message. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'disk/part_efi.c')
-rw-r--r--disk/part_efi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 829ccb6..5090efd 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -1061,10 +1061,8 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
/* Read and allocate Partition Table Entries */
*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
- if (*pgpt_pte == NULL) {
- printf("GPT: Failed to allocate memory for PTE\n");
+ if (!*pgpt_pte)
return 0;
- }
if (validate_gpt_entries(pgpt_head, *pgpt_pte)) {
free(*pgpt_pte);