Skip to content

Commit cfbaa8b

Browse files
Zhang Changzhongkuba-moo
authored andcommitted
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: ca139d7 ("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>
1 parent 794e442 commit cfbaa8b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/net/usb/cx82310_eth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
197197
}
198198

199199
/* enable ethernet mode (?) */
200-
if (cx82310_enable_ethernet(dev))
200+
ret = cx82310_enable_ethernet(dev);
201+
if (ret)
201202
goto err;
202203

203204
/* get the MAC address */

0 commit comments

Comments
 (0)