diff options
Diffstat (limited to 'gdb/remote-st.c')
-rw-r--r-- | gdb/remote-st.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/remote-st.c b/gdb/remote-st.c index 868c08e..55e1392 100644 --- a/gdb/remote-st.c +++ b/gdb/remote-st.c @@ -285,7 +285,11 @@ or target st2000 <host> <port>\n"); if (!st2000_desc) perror_with_name (dev_name); - SERIAL_SETBAUDRATE (st2000_desc, baudrate); + if (SERIAL_SETBAUDRATE (st2000_desc, baudrate)) + { + SERIAL_CLOSE (dev_name); + perror_with_name (dev_name); + } SERIAL_RAW (st2000_desc); |