libusb_open() returns int instead of libusb_device_handle.
Signed-off-by: Felipe Balbi <me@felipebalbi.com>
[dsd: small correction]
libusb_device *found = NULL;
size_t cnt = libusb_get_device_list(&list);
size_t i = 0;
+int err = 0;
if (cnt < 0)
error();
}
if (found) {
- libusb_device_handle *handle = libusb_open(found);
+ libusb_device_handle *handle;
+
+ err = libusb_open(found, &handle);
+ if (err)
+ error();
// etc
}