aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2016-10-04 14:22:41 +0300
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-10-17 09:20:22 +0100
commit3ae41fcf825277a56fadeea3dfde6bacf7e8e6c8 (patch)
treeb03b43af0e2b6fc0edf784958fc268a036b2ba79
parent67c9a5561ec7355a4a91d6ea7b861bb2c1a83c03 (diff)
downloadriscv-openocd-3ae41fcf825277a56fadeea3dfde6bacf7e8e6c8.zip
riscv-openocd-3ae41fcf825277a56fadeea3dfde6bacf7e8e6c8.tar.gz
riscv-openocd-3ae41fcf825277a56fadeea3dfde6bacf7e8e6c8.tar.bz2
jtag: drivers: mpsse: ignore error to detach kernel driver
This makes it possible to run OpenOCD as unprivileged user on FreeBSD. Change-Id: If1182d09ad2d51f370ae7e6da02f19c7a21c66c9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3800 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
-rw-r--r--src/jtag/drivers/mpsse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c
index 3c1c97c..924c974 100644
--- a/src/jtag/drivers/mpsse.c
+++ b/src/jtag/drivers/mpsse.c
@@ -247,8 +247,8 @@ static bool open_matching_device(struct mpsse_ctx *ctx, const uint16_t *vid, con
err = libusb_detach_kernel_driver(ctx->usb_dev, ctx->interface);
if (err != LIBUSB_SUCCESS && err != LIBUSB_ERROR_NOT_FOUND
&& err != LIBUSB_ERROR_NOT_SUPPORTED) {
- LOG_ERROR("libusb_detach_kernel_driver() failed with %s", libusb_error_name(err));
- goto error;
+ LOG_WARNING("libusb_detach_kernel_driver() failed with %s, trying to continue anyway",
+ libusb_error_name(err));
}
err = libusb_claim_interface(ctx->usb_dev, ctx->interface);