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>
This commit is contained in:
parent
4fe629d2e8
commit
1291c2d446
|
|
@ -1061,10 +1061,8 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
|
||||||
|
|
||||||
/* Read and allocate Partition Table Entries */
|
/* Read and allocate Partition Table Entries */
|
||||||
*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
|
*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
|
||||||
if (*pgpt_pte == NULL) {
|
if (!*pgpt_pte)
|
||||||
printf("GPT: Failed to allocate memory for PTE\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (validate_gpt_entries(pgpt_head, *pgpt_pte)) {
|
if (validate_gpt_entries(pgpt_head, *pgpt_pte)) {
|
||||||
free(*pgpt_pte);
|
free(*pgpt_pte);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue