part_efi: Drop NULL check in part_get_info_efi()
authorSimon Glass <sjg@chromium.org>
Wed, 16 Mar 2016 13:45:36 +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_get_info() calls this function and requires
it to be non-NULL.

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

index 93a7e81..fe308d7 100644 (file)
@@ -240,7 +240,7 @@ int part_get_info_efi(struct blk_desc *dev_desc, int part,
        gpt_entry *gpt_pte = NULL;
 
        /* "part" argument must be at least 1 */
-       if (!dev_desc || !info || part < 1) {
+       if (part < 1) {
                printf("%s: Invalid Argument(s)\n", __func__);
                return -1;
        }