Skip to content

Commit bdca59e

Browse files
Zongmin Zhougregkh
authored andcommitted
usbip: tools: Fix detach_port() invalid port error path
commit e7cd4b8 upstream. 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 88a0888 commit bdca59e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/usb/usbip/src/usbip_detach.c

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

8282
if (!found) {
83+
ret = -1;
8384
err("Invalid port %s > maxports %d",
8485
port, vhci_driver->nports);
8586
goto call_driver_close;

0 commit comments

Comments
 (0)