diff mbox

[U-Boot,v2,1/5] gpt: command: Remove duplicated check for empty partition description

Message ID 1448003177-26917-2-git-send-email-l.majewski@majess.pl
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Lukasz Majewski Nov. 20, 2015, 7:06 a.m. UTC
Exactly the same check is performed in set_gpt_info() function executed
just after this check.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>

---
Changes for v2:
- None
---
 common/cmd_gpt.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tom Rini Nov. 23, 2015, 10:44 p.m. UTC | #1
On Fri, Nov 20, 2015 at 08:06:13AM +0100, Lukasz Majewski wrote:

> Exactly the same check is performed in set_gpt_info() function executed
> just after this check.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/cmd_gpt.c b/common/cmd_gpt.c
index e3c0297..6bea2c7 100644
--- a/common/cmd_gpt.c
+++ b/common/cmd_gpt.c
@@ -293,9 +293,6 @@  static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part)
 	u8 part_count = 0;
 	disk_partition_t *partitions = NULL;
 
-	if (!str_part)
-		return -1;
-
 	/* fill partitions */
 	ret = set_gpt_info(blk_dev_desc, str_part,
 			&str_disk_guid, &partitions, &part_count);