]> git.sur5r.net Git - openocd/commitdiff
transport: fix bug/typo in interface_transports command
authorØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 7 Jul 2010 12:31:07 +0000 (14:31 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 7 Jul 2010 13:09:13 +0000 (15:09 +0200)
Classic manifestation of weakness of dangling {
formatting :-) Hard to spot these sort of mistakes visually.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/adapter.c

index 15b3ddc2c90c7a32ae93e18a3d2540b5a47d03a2..37e6ee9ae315f861f5936ab1ad7ebcc78a5c48b1 100644 (file)
@@ -101,14 +101,15 @@ COMMAND_HANDLER(interface_transport_command)
        retval = CALL_COMMAND_HANDLER(transport_list_parse, &transports);
        if (retval != ERROR_OK) {
                return retval;
+       }
 
        retval = allow_transports(CMD_CTX, (const char **)transports);
+
        if (retval != ERROR_OK) {
                for (unsigned i = 0; transports[i]; i++)
                        free(transports[i]);
                free(transports);
        }
-       }
        return retval;
 }