From: Hongren Zheng <i@zenithal.me>
To: Zongmin Zhou <min_halo@163.com>
Cc: valentina.manea.m@gmail.com, shuah@kernel.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Zongmin Zhou <zhouzongmin@kylinos.cn>
Subject: Re: [PATCH] usbip: tools: update return status when failed
Date: Tue, 22 Oct 2024 15:58:34 +0800 [thread overview]
Message-ID: <ZxdbKiwZ1fz4kAZw@Sun> (raw)
In-Reply-To: <20241022064856.4098350-1-min_halo@163.com>
On Tue, Oct 22, 2024 at 02:48:56PM +0800, Zongmin Zhou wrote:
> From: Zongmin Zhou <zhouzongmin@kylinos.cn>
>
> Have to set "ret" before return when found a invalid port.
>
> Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
Reviewed-by: Hongren Zheng <i@zenithal.me>
> ---
> tools/usb/usbip/src/usbip_detach.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-10-22 7:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 6:48 [PATCH] usbip: tools: update return status when failed Zongmin Zhou
2024-10-22 7:58 ` Hongren Zheng [this message]
2024-12-20 17:26 ` Shuah Khan
2024-10-23 18:59 ` Shuah Khan
2024-10-24 2:27 ` [PATCH v2] usbip: tools: Fix detach_port() invalid port error path Zongmin Zhou
2024-10-24 14:17 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZxdbKiwZ1fz4kAZw@Sun \
--to=i@zenithal.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=min_halo@163.com \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.com \
--cc=zhouzongmin@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox