netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sr9800: Add check for usbnet_get_endpoints
@ 2024-03-05  7:59 Chen Ni
  2024-03-05  8:35 ` Oliver Neukum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Ni @ 2024-03-05  7:59 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, justinstitt, andrew, linux-usb,
	netdev, linux-kernel
  Cc: Chen Ni

Add check for usbnet_get_endpoints() and return the error if it fails
in order to transfer the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/net/usb/sr9800.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c
index 143bd4ab160d..57947a5590cc 100644
--- a/drivers/net/usb/sr9800.c
+++ b/drivers/net/usb/sr9800.c
@@ -737,7 +737,9 @@ static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf)
 
 	data->eeprom_len = SR9800_EEPROM_LEN;
 
-	usbnet_get_endpoints(dev, intf);
+	ret = usbnet_get_endpoints(dev, intf);
+	if (ret)
+		goto out;
 
 	/* LED Setting Rule :
 	 * AABB:CCDD
-- 
2.25.1


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

* Re: [PATCH] sr9800: Add check for usbnet_get_endpoints
  2024-03-05  7:59 [PATCH] sr9800: Add check for usbnet_get_endpoints Chen Ni
@ 2024-03-05  8:35 ` Oliver Neukum
  2024-03-05 13:35 ` Simon Horman
  2024-03-07  4:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2024-03-05  8:35 UTC (permalink / raw)
  To: Chen Ni, davem, edumazet, kuba, pabeni, justinstitt, andrew,
	linux-usb, netdev, linux-kernel

On 05.03.24 08:59, Chen Ni wrote:
> Add check for usbnet_get_endpoints() and return the error if it fails
> in order to transfer the error.

Hi,

thank you for the patch. The asix driver also fails
to check for that failure. Could you make a similar patch?

	Regards
		Oliver


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

* Re: [PATCH] sr9800: Add check for usbnet_get_endpoints
  2024-03-05  7:59 [PATCH] sr9800: Add check for usbnet_get_endpoints Chen Ni
  2024-03-05  8:35 ` Oliver Neukum
@ 2024-03-05 13:35 ` Simon Horman
  2024-03-07  4:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-03-05 13:35 UTC (permalink / raw)
  To: Chen Ni
  Cc: davem, edumazet, kuba, pabeni, justinstitt, andrew, linux-usb,
	netdev, linux-kernel

On Tue, Mar 05, 2024 at 07:59:27AM +0000, Chen Ni wrote:
> Add check for usbnet_get_endpoints() and return the error if it fails
> in order to transfer the error.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Hi Chen Ni,

I guess that this is a bug fix and as such it should be targeted
at the net tree and annotated as such:

	Subject: [PATCH net] ...

And have a fixes tag, perhaps:

Fixes: 19a38d8e0aa3 ("USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support")

I don't think there is a need to repost to address the above,
but please keep it in mind for future Networking patch submissions.

Link: https://docs.kernel.org/process/maintainer-netdev.html

The above notwithstanding, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

...

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

* Re: [PATCH] sr9800: Add check for usbnet_get_endpoints
  2024-03-05  7:59 [PATCH] sr9800: Add check for usbnet_get_endpoints Chen Ni
  2024-03-05  8:35 ` Oliver Neukum
  2024-03-05 13:35 ` Simon Horman
@ 2024-03-07  4:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-07  4:40 UTC (permalink / raw)
  To: Chen Ni
  Cc: davem, edumazet, kuba, pabeni, justinstitt, andrew, linux-usb,
	netdev, linux-kernel

Hello:

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

On Tue,  5 Mar 2024 07:59:27 +0000 you wrote:
> Add check for usbnet_get_endpoints() and return the error if it fails
> in order to transfer the error.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/net/usb/sr9800.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
  - sr9800: Add check for usbnet_get_endpoints
    https://git.kernel.org/netdev/net-next/c/07161b2416f7

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] 4+ messages in thread

end of thread, other threads:[~2024-03-07  4:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05  7:59 [PATCH] sr9800: Add check for usbnet_get_endpoints Chen Ni
2024-03-05  8:35 ` Oliver Neukum
2024-03-05 13:35 ` Simon Horman
2024-03-07  4:40 ` 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).