Re: [PATCH 1/1] net: usb: set error code when usb_alloc_urb fails

2016-12-05 Thread David Miller
From: Pan Bian Date: Sat, 3 Dec 2016 19:24:48 +0800 > In function lan78xx_probe(), variable ret takes the errno code on > failures. However, when the call to usb_alloc_urb() fails, its value > will keeps 0. 0 indicates success in the context, which is inconsistent > with

RE: [PATCH 1/1] net: usb: set error code when usb_alloc_urb fails

2016-12-05 Thread Woojung.Huh
> Signed-off-by: Pan Bian > --- > drivers/net/usb/lan78xx.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c > index db558b8..f33460c 100644 > --- a/drivers/net/usb/lan78xx.c > +++ b/drivers/net/usb/lan78xx.c >

[PATCH 1/1] net: usb: set error code when usb_alloc_urb fails

2016-12-03 Thread Pan Bian
In function lan78xx_probe(), variable ret takes the errno code on failures. However, when the call to usb_alloc_urb() fails, its value will keeps 0. 0 indicates success in the context, which is inconsistent with the execution result. This patch fixes the bug, assigning "-ENOMEM" to ret when