Skip to content

Commit 7d10f07

Browse files
Dejin Zhengdavem330
authored andcommitted
net: stmmac: fix a possible endless loop
It forgot to reduce the value of the variable retry in a while loop in the ethqos_configure() function. It may cause an endless loop and without timeout. Fixes: a7c30e6 ("net: stmmac: Add driver for Qualcomm ethqos") Signed-off-by: Dejin Zheng <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 963485d commit 7d10f07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ static int ethqos_configure(struct qcom_ethqos *ethqos)
413413
dll_lock = rgmii_readl(ethqos, SDC4_STATUS);
414414
if (dll_lock & SDC4_STATUS_DLL_LOCK)
415415
break;
416+
retry--;
416417
} while (retry > 0);
417418
if (!retry)
418419
dev_err(&ethqos->pdev->dev,

0 commit comments

Comments
 (0)