diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index e50a82d61d..d9f7671fe4 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -1889,7 +1889,6 @@ static void stm32_receive(struct stm32_ethmac_s *priv) static void stm32_freeframe(struct stm32_ethmac_s *priv) { struct eth_txdesc_s *txdesc; - int i; ninfo("txhead: %p txtail: %p inflight: %d\n", priv->txhead, priv->txtail, priv->inflight); @@ -1901,7 +1900,7 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv) { DEBUGASSERT(priv->inflight > 0); - for (i = 0; (txdesc->tdes0 & ETH_TDES0_OWN) == 0; i++) + while ((txdesc->tdes0 & ETH_TDES0_OWN) == 0) { /* There should be a buffer assigned to all in-flight * TX descriptors.