Skip to content

Commit

Permalink
cx82310_eth: fix error return code in cx82310_bind()
Browse files Browse the repository at this point in the history
commit cfbaa8b upstream.

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 <[email protected]>
Signed-off-by: Zhang Changzhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Zhang Changzhong authored and gregkh committed Sep 12, 2024
1 parent bc79026 commit e70c0b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/usb/cx82310_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,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 */
Expand Down

0 comments on commit e70c0b7

Please sign in to comment.