Pan Bian 51920830d9 net: usb: set error code when usb_alloc_urb fails
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 usb_alloc_urb() returns a NULL pointer.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188771

Signed-off-by: Pan Bian <bianpan2016@163.com>
Acked-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-05 13:27:15 -05:00
..
2016-08-06 09:20:13 -04:00
2016-08-15 11:57:55 -07:00
2016-11-27 19:59:50 -05:00
2016-08-31 14:33:09 -07:00
2016-11-30 14:33:44 -05:00
2016-09-20 22:55:23 -04:00
2016-08-30 22:27:18 -07:00