提交 7d10f077 编写于 作者: D Dejin Zheng 提交者: David S. Miller

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: a7c30e62 ("net: stmmac: Add driver for Qualcomm ethqos")
Signed-off-by: NDejin Zheng <zhengdejin5@gmail.com>
Acked-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 963485d4
...@@ -413,6 +413,7 @@ static int ethqos_configure(struct qcom_ethqos *ethqos) ...@@ -413,6 +413,7 @@ static int ethqos_configure(struct qcom_ethqos *ethqos)
dll_lock = rgmii_readl(ethqos, SDC4_STATUS); dll_lock = rgmii_readl(ethqos, SDC4_STATUS);
if (dll_lock & SDC4_STATUS_DLL_LOCK) if (dll_lock & SDC4_STATUS_DLL_LOCK)
break; break;
retry--;
} while (retry > 0); } while (retry > 0);
if (!retry) if (!retry)
dev_err(&ethqos->pdev->dev, dev_err(&ethqos->pdev->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册