diff options
author | Michal Simek | 2021-03-31 09:05:52 +0200 |
---|---|---|
committer | Michal Simek | 2021-04-23 08:45:55 +0200 |
commit | 74fe3f2ef3d66d1eaf4564467c9a34bfe3561d30 (patch) | |
tree | 5a920b73432f9c8bdfadb3b05def9bbb29f9f2f4 /cmd/dfu.c | |
parent | 4274dc39478b2a28ce01d83233056a550a0f8a96 (diff) |
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 <michal.simek@xilinx.com>
Diffstat (limited to 'cmd/dfu.c')
-rw-r--r-- | cmd/dfu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/dfu.c b/cmd/dfu.c index ef4f897ce07..4a288f74c2c 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); bool retry = false; do { - run_usb_dnl_gadget(controller_index, "usb_dnl_dfu"); + ret = run_usb_dnl_gadget(controller_index, "usb_dnl_dfu"); if (dfu_reinit_needed) { dfu_free_entities(); |