libusb: check libusb_reset_device result

This commit is contained in:
Matthias Ringwald 2019-01-23 09:18:29 +01:00
parent 84b427c355
commit 6f7dfc693b

View File

@ -791,7 +791,7 @@ static libusb_device_handle * try_open_device(libusb_device * device){
log_info("libusb open %d, handle %p", r, dev_handle);
// reset device
libusb_reset_device(dev_handle);
r = libusb_reset_device(dev_handle);
if (r < 0) {
log_error("libusb_reset_device failed!");
libusb_close(dev_handle);