if (libusb_kernel_driver_active(usb->devhdl, USB_INTERFACE) == 1) {
ret = libusb_detach_kernel_driver(usb->devhdl, USB_INTERFACE);
if (ret < 0) {
- sr_err("Failed to detach kernel driver: %i.",
+ sr_err("Failed to detach kernel driver: %s.",
libusb_error_name(ret));
return SR_ERR;
}
USB_INTERFACE);
if (ret < 0) {
- sr_err("Failed to detach kernel driver: %i.",
+ sr_err("Failed to detach kernel driver: %s.",
libusb_error_name(ret));
libusb_close(usb.devhdl);
return SR_ERR;
ret = libusb_release_interface(usb.devhdl, USB_INTERFACE);
if (ret < 0) {
- sr_err("Failed to release interface: %i.",
+ sr_err("Failed to release interface: %s.",
libusb_error_name(ret));
libusb_close(usb.devhdl);
return SR_ERR;