]> git.sur5r.net Git - u-boot/commitdiff
part_efi: Drop the NULL check on dev_desc in part_print_efi()
authorSimon Glass <sjg@chromium.org>
Wed, 16 Mar 2016 13:45:35 +0000 (07:45 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 22 Mar 2016 16:16:19 +0000 (12:16 -0400)
This cannot be NULL since part_print() calls this function and requires it
to be non-NULL.

Reported-by: Coverity (CID: 138498)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
disk/part_efi.c

index 77bdfcbce5eafa694f15e67f1bda009597d579c7..93a7e81835e9ff12e4c69a49cf686367a8e178cc 100644 (file)
@@ -184,10 +184,6 @@ void part_print_efi(struct blk_desc *dev_desc)
        char uuid[37];
        unsigned char *uuid_bin;
 
-       if (!dev_desc) {
-               printf("%s: Invalid Argument(s)\n", __func__);
-               return;
-       }
        /* This function validates AND fills in the GPT header and PTE */
        if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
                         gpt_head, &gpt_pte) != 1) {