From 933539089899a2f5ba15840d0fd8aedb86bc68b7 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 21 Feb 2025 19:14:49 +0200 Subject: [PATCH] cdba-server: don't try opening the board if there is none If the cdba failed to find the board, don't call device_fastboot_open(). Signed-off-by: Dmitry Baryshkov --- cdba-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdba-server.c b/cdba-server.c index c463f19..992730e 100644 --- a/cdba-server.c +++ b/cdba-server.c @@ -59,10 +59,10 @@ static void msg_select_board(const void *param) if (!selected_device) { fprintf(stderr, "failed to open %s\n", (const char *)param); watch_quit(); + } else { + device_fastboot_open(selected_device, &fastboot_ops); } - device_fastboot_open(selected_device, &fastboot_ops); - cdba_send(MSG_SELECT_BOARD); }