linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net v2] usbnet: fix error return code in usbnet_probe()
  2021-10-26 12:40 [PATCH net v2] usbnet: fix error return code in usbnet_probe() Wang Hai
@ 2021-10-26 12:30 ` Johan Hovold
  2021-10-27 19:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2021-10-26 12:30 UTC (permalink / raw)
  To: Wang Hai; +Cc: oneukum, davem, kuba, netdev, linux-usb, linux-kernel

On Tue, Oct 26, 2021 at 08:40:15PM +0800, Wang Hai wrote:
> Return error code if usb_maxpacket() returns 0 in usbnet_probe()
> 
> Fixes: 397430b50a36 ("usbnet: sanity check for maxpacket")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>

This needs to go to stable as well as the offending patch is being
backported.

Cc: stable@vger.kernel.org
Reviewed-by: Johan Hovold <johan@kernel.org>

> ---
> v1->v2: change '-EINVAL' to '-ENODEV'
>  drivers/net/usb/usbnet.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index 80432ee0ce69..a33d7fb82a00 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -1790,6 +1790,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
>  	dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
>  	if (dev->maxpacket == 0) {
>  		/* that is a broken device */
> +		status = -ENODEV;
>  		goto out4;
>  	}

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net v2] usbnet: fix error return code in usbnet_probe()
@ 2021-10-26 12:40 Wang Hai
  2021-10-26 12:30 ` Johan Hovold
  2021-10-27 19:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Hai @ 2021-10-26 12:40 UTC (permalink / raw)
  To: oneukum, davem, kuba, johan; +Cc: netdev, linux-usb, linux-kernel

Return error code if usb_maxpacket() returns 0 in usbnet_probe()

Fixes: 397430b50a36 ("usbnet: sanity check for maxpacket")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
v1->v2: change '-EINVAL' to '-ENODEV'
 drivers/net/usb/usbnet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 80432ee0ce69..a33d7fb82a00 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1790,6 +1790,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 	dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
 	if (dev->maxpacket == 0) {
 		/* that is a broken device */
+		status = -ENODEV;
 		goto out4;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net v2] usbnet: fix error return code in usbnet_probe()
  2021-10-26 12:40 [PATCH net v2] usbnet: fix error return code in usbnet_probe() Wang Hai
  2021-10-26 12:30 ` Johan Hovold
@ 2021-10-27 19:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-27 19:20 UTC (permalink / raw)
  To: Wang Hai; +Cc: oneukum, davem, kuba, johan, netdev, linux-usb, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 26 Oct 2021 20:40:15 +0800 you wrote:
> Return error code if usb_maxpacket() returns 0 in usbnet_probe()
> 
> Fixes: 397430b50a36 ("usbnet: sanity check for maxpacket")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
> v1->v2: change '-EINVAL' to '-ENODEV'
>  drivers/net/usb/usbnet.c | 1 +
>  1 file changed, 1 insertion(+)

Here is the summary with links:
  - [net,v2] usbnet: fix error return code in usbnet_probe()
    https://git.kernel.org/netdev/net/c/6f7c88691191

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-27 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 12:40 [PATCH net v2] usbnet: fix error return code in usbnet_probe() Wang Hai
2021-10-26 12:30 ` Johan Hovold
2021-10-27 19:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).