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: ca139d76b0 ("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>
This commit is contained in:
Zhang Changzhong 2020-11-13 14:07:07 +08:00 committed by Jakub Kicinski
parent 794e442ca3
commit cfbaa8b33e
1 changed files with 2 additions and 1 deletions

View File

@ -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 */