aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZongmin Zhou <[email protected]>2024-10-24 10:27:00 +0800
committerGreg Kroah-Hartman <[email protected]>2024-10-29 04:23:23 +0100
commite7cd4b811c9e019f5acbce85699c622b30194c24 (patch)
treefd2ba1498687625833778f14e7aa0eb69ac04c23
parent5963e0786a3f28cd87c950dec18574bfcceb8335 (diff)
usbip: tools: Fix detach_port() invalid port error path
The detach_port() doesn't return error when detach is attempted on an invalid port. Fixes: 40ecdeb1a187 ("usbip: usbip_detach: fix to check for invalid ports") Cc: [email protected] Reviewed-by: Hongren Zheng <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Signed-off-by: Zongmin Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--tools/usb/usbip/src/usbip_detach.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/usb/usbip/src/usbip_detach.c b/tools/usb/usbip/src/usbip_detach.c
index b29101986b5a..6b78d4a81e95 100644
--- a/tools/usb/usbip/src/usbip_detach.c
+++ b/tools/usb/usbip/src/usbip_detach.c
@@ -68,6 +68,7 @@ static int detach_port(char *port)
}
if (!found) {
+ ret = -1;
err("Invalid port %s > maxports %d",
port, vhci_driver->nports);
goto call_driver_close;