Initialize the variable as suggested by http://libusb.sourceforge.net/api-1.0/caveats.html
goto fail_libusb_open;
}
- int current_configuration = 0;
+ int current_configuration = -1;
libusb_get_configuration(dev, ¤t_configuration);
if (current_configuration != 1)
libusb_set_configuration(dev, 1);
libusb_claim_interface(dev, 0);
+ current_configuration = -1;
libusb_get_configuration(dev, ¤t_configuration);
if (current_configuration != 1) {
res = -ENODEV;