]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: sdp: Reorder variable declaration
authorMarek Vasut <marex@denx.de>
Fri, 1 Sep 2023 09:49:52 +0000 (11:49 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 15 Sep 2023 21:38:02 +0000 (23:38 +0200)
Move the variable declaration around to improve code readability.
No functional change.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
cmd/usb_gadget_sdp.c

index 1af82e1136656212caa26c327c49dc76e7e70795..784d1b49768f2bbf12a01a60721d8b6906fceb35 100644 (file)
 
 static int do_sdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
+       int controller_index;
        int ret;
 
        if (argc < 2)
                return CMD_RET_USAGE;
 
-       char *usb_controller = argv[1];
-       int controller_index = simple_strtoul(usb_controller, NULL, 0);
+       controller_index = simple_strtoul(argv[1], NULL, 0);
        usb_gadget_initialize(controller_index);
 
        g_dnl_clear_detach();