mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
r8152: handle the return value of usb_reset_device()
If usb_reset_device() returns a negative error code, stop the
process of probing.
Fixes: 10c3271712 ("r8152: disable the ECM mode")
Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com>
Reviewed-by: Hayes Wang <hayeswang@realtek.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260604092247.27158-450-nic_swsd@realtek.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
ee30dd2909
commit
19440600e7
|
|
@ -9851,7 +9851,12 @@ static int rtl8152_probe_once(struct usb_interface *intf,
|
|||
struct net_device *netdev;
|
||||
int ret;
|
||||
|
||||
usb_reset_device(udev);
|
||||
ret = usb_reset_device(udev);
|
||||
if (ret < 0) {
|
||||
dev_err(&intf->dev, "USB reset failed, errno=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
netdev = alloc_etherdev(sizeof(struct r8152));
|
||||
if (!netdev) {
|
||||
dev_err(&intf->dev, "Out of memory\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user