summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhang Changzhong <zhangchangzhong@huawei.com>2020-11-13 14:07:07 +0800
committerJakub Kicinski <kuba@kernel.org>2020-11-16 15:23:44 -0800
commitcfbaa8b33e022aca62a3f2815ffbc02874d4cb8b (patch)
treed71805fc6d36ab12bba30443317053056ce3d973 /drivers
parent794e442ca39e6c8d46003c430559bdb67a73690c (diff)
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@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Link: https://lore.kernel.org/r/1605247627-15385-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/cx82310_eth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c
index ca89d8258dd3..c4568a491dc4 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 */