From: Michal Simek Date: Wed, 31 Mar 2021 07:05:52 +0000 (+0200) Subject: cmd: dfu: Propagate error if dfu gadget fails X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bb624e433ba98cb78d4f3ae5e0e8b6011ea7fce;p=thirdparty%2Fu-boot.git cmd: dfu: Propagate error if dfu gadget fails On systems without usb gadget dfu core fails which was reported by error but command itself returns pass which breaks any usage in a script. That's why propagate error from run_usb_dnl_gadget(). Fixes: 16297cfb2a20 ("usb: new board-specific USB init interface") Signed-off-by: Michal Simek --- diff --git a/cmd/dfu.c b/cmd/dfu.c index 7310595a027..6abcc699004 100644 --- a/cmd/dfu.c +++ b/cmd/dfu.c @@ -68,7 +68,7 @@ static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) int controller_index = simple_strtoul(usb_controller, NULL, 0); - run_usb_dnl_gadget(controller_index, "usb_dnl_dfu"); + ret = run_usb_dnl_gadget(controller_index, "usb_dnl_dfu"); done: dfu_free_entities();