projects
/
libam7xxx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c5e125
)
am7xxx_mode_switch: release interface only if claimed
author
Antonio Ospite <ospite@studenti.unina.it>
Sat, 23 Mar 2013 22:03:48 +0000
(23:03 +0100)
committer
Antonio Ospite <ospite@studenti.unina.it>
Sat, 23 Mar 2013 22:03:48 +0000
(23:03 +0100)
examples/am7xxx_mode_switch.c
patch
|
blob
|
history
diff --git
a/examples/am7xxx_mode_switch.c
b/examples/am7xxx_mode_switch.c
index
7509981
..
572586c
100644
(file)
--- 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_
clos
e;
+ goto out_libusb_
release_interfac
e;
}
fprintf(stderr, "OK, command sent!\n");
-out_libusb_
clos
e:
+out_libusb_
release_interfac
e:
libusb_release_interface(usb_device, AM7XXX_STORAGE_INTERFACE);
+out_libusb_close:
libusb_close(usb_device);
usb_device = NULL;
-
out:
libusb_exit(NULL);
return ret;