From c3fd198f0d3ec6b53d6aa23d4cb90b047f3661d3 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 16 May 2021 22:58:37 +0200 Subject: [PATCH] bmp_libusb: Reject non-BMP devices with VID 1d50. --- src/platforms/hosted/bmp_libusb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index 743f25b1..bef9e094 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -222,8 +222,9 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) if (desc.idVendor == VENDOR_ID_BMP) { if (desc.idProduct == PRODUCT_ID_BMP) { type = BMP_TYPE_BMP; - } else if (desc.idProduct == PRODUCT_ID_BMP_BL) { - DEBUG_WARN("BMP in botloader mode found. Restart or reflash!\n"); + } else { + if (desc.idProduct == PRODUCT_ID_BMP_BL) + DEBUG_WARN("BMP in botloader mode found. Restart or reflash!\n"); continue; } } else if ((type = find_cmsis_dap_interface(dev, info)) != BMP_TYPE_NONE) {