Skip to content
Snippets Groups Projects
Commit dbdc2744 authored by Michal Simek's avatar Michal Simek Committed by Marek Vasut
Browse files

cmd: dfu: Add error handling for board_usb_init


board_usb_init() can failed and error should be handled properly.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent d8bdfc80
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget)
bool dfu_reset = false;
int ret, i = 0;
board_usb_init(usbctrl_index, USB_INIT_DEVICE);
ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE);
if (ret) {
error("board usb init failed\n");
return CMD_RET_FAILURE;
}
g_dnl_clear_detach();
ret = g_dnl_register(usb_dnl_gadget);
if (ret) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment