X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/2564604d1968bec8a651e7f9d1bca4bf87b3672f..f6f16e3347d967bc04be73a32501b68ffc3427f3:/examples/am7xxx_mode_switch.c?ds=sidebyside diff --git a/examples/am7xxx_mode_switch.c b/examples/am7xxx_mode_switch.c index 7509981..572586c 100644 --- a/examples/am7xxx_mode_switch.c +++ b/examples/am7xxx_mode_switch.c @@ -81,16 +81,16 @@ int main(void) if (ret != 0 || (unsigned int)transferred != len) { fprintf(stderr, "ret: %d\ttransferred: %d (expected %u)\n", ret, transferred, len); - goto out_libusb_close; + goto out_libusb_release_interface; } fprintf(stderr, "OK, command sent!\n"); -out_libusb_close: +out_libusb_release_interface: libusb_release_interface(usb_device, AM7XXX_STORAGE_INTERFACE); +out_libusb_close: libusb_close(usb_device); usb_device = NULL; - out: libusb_exit(NULL); return ret;