]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
disk: incorrect message in is_gpt_valid()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 9 May 2022 19:35:44 +0000 (21:35 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 28 May 2022 08:59:27 +0000 (10:59 +0200)
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>
disk/part_efi.c

index 829ccb6bd17c2b896a2d4935782e14ccf915e6be..5090efd1192f7c6e8a50e4fe46ce73e539750cea 100644 (file)
@@ -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);