mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Zongmin Zhou <min_halo@163.com>,
	valentina.manea.m@gmail.com, shuah@kernel.org, i@zenithal.me
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zongmin Zhou <zhouzongmin@kylinos.cn>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] usbip: tools: update return status when failed
Date: Wed, 23 Oct 2024 12:59:02 -0600	[thread overview]
Message-ID: <8d1a298c-78e4-4dfd-a5fb-5dd96fb22e81@linuxfoundation.org> (raw)
In-Reply-To: <20241022064856.4098350-1-min_halo@163.com>

On 10/22/24 00:48, Zongmin Zhou wrote:
> From: Zongmin Zhou <zhouzongmin@kylinos.cn>

Update the short log to clearly indicate that this
is a fix:

usbip: tools: Fix detach_port() invalid port error path

> 
> Have to set "ret" before return when found a invalid port.

Give more details that detach_port() doesn't return error
when detach is attempted on an invalid port.

This is a fix for 40ecdeb1a1875
usbip: usbip_detach: fix to check for invalid ports

Add Fixes tag

This patch can be tagged for stable.

> 
> Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
> ---
>   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;

With these changes:

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

  parent reply	other threads:[~2024-10-23 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  6:48 Zongmin Zhou
2024-10-22  7:58 ` Hongren Zheng
2024-12-20 17:26   ` Shuah Khan
2024-10-23 18:59 ` Shuah Khan [this message]
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=8d1a298c-78e4-4dfd-a5fb-5dd96fb22e81@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=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

Powered by JetHome