projects
/
libam7xxx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bd2fb79
)
am7xxx: clean up the exit path in open_device()
author
Antonio Ospite <ao2@ao2.it>
Sun, 25 Jan 2015 22:27:37 +0000
(23:27 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Sun, 25 Jan 2015 22:27:37 +0000
(23:27 +0100)
src/am7xxx.c
patch
|
blob
|
history
diff --git
a/src/am7xxx.c
b/src/am7xxx.c
index
3334615
..
fedf11a
100644
(file)
--- a/
src/am7xxx.c
+++ b/
src/am7xxx.c
@@
-747,12
+747,15
@@
static int open_device(am7xxx_context *ctx,
debug(ctx, "libusb_claim_interface failed\n");
debug(ctx, "Cannot claim interface %hhu\n",
(*dev)->desc->interface_number);
-out_libusb_close:
- libusb_close((*dev)->usb_device);
- (*dev)->usb_device = NULL;
+ goto out_libusb_close;
}
out:
return ret;
+
+out_libusb_close:
+ libusb_close((*dev)->usb_device);
+ (*dev)->usb_device = NULL;
+ return ret;
}
typedef enum {