summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2f9553f)
Return a negative error value when the configuration check done after
claiming the interface fails, and also fix the output messages.
current_configuration = -1;
libusb_get_configuration((*dev)->usb_device, ¤t_configuration);
if (current_configuration != (*dev)->desc->configuration) {
current_configuration = -1;
libusb_get_configuration((*dev)->usb_device, ¤t_configuration);
if (current_configuration != (*dev)->desc->configuration) {
- debug(ctx, "libusb configuration changed\n");
- debug(ctx, "Cannot claim interface %hhu\n",
- (*dev)->desc->interface_number);
+ debug(ctx, "libusb configuration changed (expected: %hhu, current: %hhu\n",
+ (*dev)->desc->configuration, current_configuration);
+ ret = -EINVAL;
goto out_libusb_close;
}
out:
goto out_libusb_close;
}
out: