aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/r8152.c
diff options
context:
space:
mode:
authorHayes Wang <hayeswang@realtek.com>2021-04-22 16:48:02 +0800
committerDavid S. Miller <davem@davemloft.net>2021-04-22 14:14:45 -0700
commitf49c35b89b784c20a8868bb6f57f3e25277268c3 (patch)
tree86af3dcea21ed7b07997169c0515dba490bdef7b /drivers/net/usb/r8152.c
parentMerge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue (diff)
downloadlinux-dev-f49c35b89b784c20a8868bb6f57f3e25277268c3.tar.xz
linux-dev-f49c35b89b784c20a8868bb6f57f3e25277268c3.zip
r8152: replace return with break for ram code speedup mode timeout
When the timeout occurs, we still have to run the following process for releasing patch request. Otherwise, the PHY would keep no link. Therefore, use break to stop the loop of loading firmware and release the patch request rather than return the function directly. Fixes: 4a51b0e8a014 ("r8152: support PHY firmware for RTL8156 series") Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/r8152.c')
-rw-r--r--drivers/net/usb/r8152.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 9119a860e9bd..5b4ed69df64f 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4803,7 +4803,7 @@ static void rtl_ram_code_speed_up(struct r8152 *tp, struct fw_phy_speed_up *phy,
if (i == 1000) {
dev_err(&tp->intf->dev, "ram code speedup mode timeout\n");
- return;
+ break;
}
}