[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1605247627-15385-1-git-send-email-zhangchangzhong@huawei.com>
Date: Fri, 13 Nov 2020 14:07:07 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <linux@...y.sk>
CC: <linux-usb@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH net] cx82310_eth: fix error return code in cx82310_bind()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: ca139d76b0d9 ("cx82310_eth: re-enable ethernet mode after router reboot")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/net/usb/cx82310_eth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c
index ca89d82..c4568a4 100644
--- a/drivers/net/usb/cx82310_eth.c
+++ b/drivers/net/usb/cx82310_eth.c
@@ -197,7 +197,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
}
/* enable ethernet mode (?) */
- if (cx82310_enable_ethernet(dev))
+ ret = cx82310_enable_ethernet(dev);
+ if (ret)
goto err;
/* get the MAC address */
--
2.9.5
Powered by blists - more mailing lists