summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
d8cbd65)
Two error checks had a missing "ret = ", which lead to an incorrect
value being passed to libusb_error_name().
Also, lower the level for those messages from sr_err() to sr_dbg()
since they're not fatal.
}
for (confidx = 0; confidx < des.bNumConfigurations; confidx++) {
}
for (confidx = 0; confidx < des.bNumConfigurations; confidx++) {
- if (libusb_get_config_descriptor(devlist[i], confidx, &confdes) < 0) {
- sr_err("Failed to get configuration descriptor: %s.",
- libusb_error_name(ret));
+ if ((ret = libusb_get_config_descriptor(devlist[i], confidx, &confdes)) < 0) {
+ sr_dbg("Failed to get configuration descriptor: %s, "
+ "ignoring device.", libusb_error_name(ret));
break;
}
for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) {
break;
}
for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) {
}
for (confidx = 0; confidx < des.bNumConfigurations; confidx++) {
}
for (confidx = 0; confidx < des.bNumConfigurations; confidx++) {
- if (libusb_get_config_descriptor(dev, confidx, &confdes) < 0) {
- sr_err("Failed to get configuration descriptor: %s.",
- libusb_error_name(ret));
+ if ((ret = libusb_get_config_descriptor(dev, confidx, &confdes)) < 0) {
+ sr_dbg("Failed to get configuration descriptor: %s, "
+ "ignoring device.", libusb_error_name(ret));
continue;
}
for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) {
continue;
}
for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) {