[PATCH] DFU: fix parsing for the first leading space

Manorit Chawdhry m-chawdhry at ti.com
Mon May 15 08:34:09 CEST 2023


The commit strips the initial leading space while parsing the part in
dfu_alt_info.

Signed-off-by: Apurva Nandan <a-nandan at ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
---
 drivers/dfu/dfu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 516dda617962..c78396243e58 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -505,6 +505,7 @@ static int dfu_fill_entity(struct dfu_entity *dfu, char *s, int alt,
 	char *st;
 
 	debug("%s: %s interface: %s dev: %s\n", __func__, s, interface, devstr);
+	s = skip_spaces(s);
 	st = strsep(&s, " \t");
 	strlcpy(dfu->name, st, DFU_NAME_SIZE);
 

---
base-commit: 0a9a4384c1483a88776bca38e28f09be51161034
change-id: 20230515-b4-upstream-fix-dfu-124077310d4f

Best regards,
-- 
Manorit Chawdhry <m-chawdhry at ti.com>



More information about the U-Boot mailing list