]> git.sur5r.net Git - openocd/commitdiff
jtag: drivers: mpsse: ignore error to detach kernel driver
authorPaul Fertser <fercerpav@gmail.com>
Tue, 4 Oct 2016 11:22:41 +0000 (14:22 +0300)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Mon, 17 Oct 2016 08:20:22 +0000 (09:20 +0100)
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>
src/jtag/drivers/mpsse.c

index 3c1c97cdc23f1a3f14f1125042ccf1dc3b5e37ae..924c974502af9ac8b3f5acfdfcd37077642f7a2d 100644 (file)
@@ -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);