summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-06-14 01:46:35 -0700
committerYe Li <ye.li@nxp.com>2018-06-14 19:53:32 -0700
commitef5b79ce693193037a734982e1f256da67ebe9cb (patch)
tree531f0e1432ca82e2d6ddc5a0d1960cda00a1c0ec /cmd
parent295edb383c98b80fa74876f5030eef74e1209371 (diff)
MLK-18614-1 cmd: fastboot: Fix build warning
Fix build warning below: cmd/fastboot.c: In function ‘do_fastboot’: cmd/fastboot.c:19:8: warning: variable ‘usb_controller’ set but not used [-Wunused-but-set-variable] char *usb_controller; Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit ea5057f74288407dfce2de3a7130f607e7006344)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fastboot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index be4a11f9b7..3fd79864cf 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -23,10 +23,9 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_USAGE;
usb_controller = argv[1];
+ controller_index = simple_strtoul(usb_controller, NULL, 0);
#ifdef CONFIG_FASTBOOT_USB_DEV
controller_index = CONFIG_FASTBOOT_USB_DEV;
-#else
- controller_index = simple_strtoul(usb_controller, NULL, 0);
#endif
ret = board_usb_init(controller_index, USB_INIT_DEVICE);