mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 04:04:26 +08:00
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: 40ecdeb1a1
("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>
This commit is contained in:
parent
5963e0786a
commit
e7cd4b811c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user