mw_debug: Default to jtag backend if unspecified
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 24 Sep 2021 04:23:06 +0000 (14:23 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 24 Sep 2021 04:23:06 +0000 (14:23 +1000)
It avoids typing it all the time

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
scripts/mw_debug/mw_debug.c

index d9fe749a4435fd839bd145ba01dc9a5b5db1cce4..30803e579ad1782c2c86cee4e809a268f7765423 100644 (file)
@@ -744,10 +744,8 @@ int main(int argc, char *argv[])
                }
        }
 
-       if (b == NULL) {
-               fprintf(stderr, "No backend selected\n");
-               exit(1);
-       }
+       if (b == NULL)
+               b = &jtag_backend;
 
        rc = b->init(target);
        if (rc < 0)