Commit cfbaa8b3 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Jakub Kicinski

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: ca139d76 ("cx82310_eth: re-enable ethernet mode after router reboot")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605247627-15385-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 794e442c
...@@ -197,7 +197,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -197,7 +197,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
} }
/* enable ethernet mode (?) */ /* enable ethernet mode (?) */
if (cx82310_enable_ethernet(dev)) ret = cx82310_enable_ethernet(dev);
if (ret)
goto err; goto err;
/* get the MAC address */ /* get the MAC address */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment