summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-08-07 11:14:43 +0100
committerMark Brown <broonie@kernel.org>2018-08-07 11:14:43 +0100
commit9320831dc88c215d47d1095c06253ac38d41f29d (patch)
tree9ea6ad6aad2b12cc58c2bcfd86092b7ce372ebea /tools
parent4fa7c16a310c6abbf6873659655c3e9fb1bdc4ce (diff)
parentbffa1e42b3713aa7911cc3f9a6e5a2dbbf1dc789 (diff)
Merge tag 'v4.4.146' into linux-linaro-lsk-v4.4
This is the 4.4.146 stable release
Diffstat (limited to 'tools')
-rw-r--r--tools/usb/usbip/src/usbip_detach.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/usb/usbip/src/usbip_detach.c b/tools/usb/usbip/src/usbip_detach.c
index 9db9d21bb2ec..6a8db858caa5 100644
--- a/tools/usb/usbip/src/usbip_detach.c
+++ b/tools/usb/usbip/src/usbip_detach.c
@@ -43,7 +43,7 @@ void usbip_detach_usage(void)
static int detach_port(char *port)
{
- int ret;
+ int ret = 0;
uint8_t portnum;
char path[PATH_MAX+1];
@@ -73,9 +73,12 @@ static int detach_port(char *port)
}
ret = usbip_vhci_detach_device(portnum);
- if (ret < 0)
- return -1;
+ if (ret < 0) {
+ ret = -1;
+ goto call_driver_close;
+ }
+call_driver_close:
usbip_vhci_driver_close();
return ret;