Skip to content

Commit

Permalink
r8152: replace return with break for ram code speedup mode timeout
Browse files Browse the repository at this point in the history
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: 4a51b0e ("r8152: support PHY firmware for RTL8156 series")
Signed-off-by: Hayes Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hayesorz authored and davem330 committed Apr 22, 2021
1 parent 9904e1e commit f49c35b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit f49c35b

Please sign in to comment.