[U-Boot] [PATCH 06/14] part_efi: Drop NULL check in part_get_info_efi()

Simon Glass sjg at chromium.org
Wed Mar 16 14:45:36 CET 2016


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 at chromium.org>
---

 disk/part_efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index 93a7e81..fe308d7 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -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;
 	}
-- 
2.7.0.rc3.207.g0ac5344



More information about the U-Boot mailing list