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: stable@vger.kernel.org Reviewed-by: Hongren Zheng <i@zenithal.me> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Link: https://lore.kernel.org/r/20241024022700.1236660-1-min_halo@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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)