From 110d5abe32bd05dcd5c868c190812c5003e18ff1 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 10 Jan 2011 00:14:35 -0300 Subject: [PATCH] tools/atrf-txrx/atrf-txrx.c (enter_test_mode_231): clean up and exit on error --- tools/atrf-txrx/atrf-txrx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/atrf-txrx/atrf-txrx.c b/tools/atrf-txrx/atrf-txrx.c index 425c462..a83ffaf 100644 --- a/tools/atrf-txrx/atrf-txrx.c +++ b/tools/atrf-txrx/atrf-txrx.c @@ -230,7 +230,8 @@ static void enter_test_mode_231(struct atrf_dsc *dsc, uint8_t cont_tx) case CONT_TX_M2M: fprintf(stderr, "-2 MHz mode is not supported by the AT86RF231\n"); - break; + atrf_close(dsc); + exit(1); case CONT_TX_M500K: memset(buf, 0, sizeof(buf)); break;