If we don't have a partition name passed, report it as not found.

Signed-off-by: Alex Kiernan <alex.kier...@gmail.com>
---

Changes in v2: None

 drivers/fastboot/fb_getvar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 7989a19..cc74bab 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -66,7 +66,8 @@ void fb_getvar(char *cmd_parameter, char *response)
                dev_desc = blk_get_dev("mmc", 0);
                if (!dev_desc) {
                        fastboot_fail("block device not found", response);
-               } else if (part_get_info_by_name(dev_desc, part_name,
+               } else if (!part_name ||
+                          part_get_info_by_name(dev_desc, part_name,
                                                 &part_info) < 0) {
                        fastboot_fail("partition not found", response);
                } else if (!strcmp_l1("partition-type", cmd_parameter)) {
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to