Skip to content

Commit e7cd4b8

Browse files
Zongmin Zhougregkh
authored andcommitted
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: 40ecdeb ("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]>
1 parent 5963e07 commit e7cd4b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/usb/usbip/src/usbip_detach.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static int detach_port(char *port)
6868
}
6969

7070
if (!found) {
71+
ret = -1;
7172
err("Invalid port %s > maxports %d",
7273
port, vhci_driver->nports);
7374
goto call_driver_close;

0 commit comments

Comments
 (0)