Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhang Changzhong and committed by
Jakub Kicinski
cfbaa8b3 794e442c

+2 -1
+2 -1
drivers/net/usb/cx82310_eth.c
··· 197 197 } 198 198 199 199 /* enable ethernet mode (?) */ 200 - if (cx82310_enable_ethernet(dev)) 200 + ret = cx82310_enable_ethernet(dev); 201 + if (ret) 201 202 goto err; 202 203 203 204 /* get the MAC address */