Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec1652af authored by roel kluin's avatar roel kluin Committed by David S. Miller
Browse files

bcm63xx_enet: timeout off by one in do_mdio_op()



`while (limit-- >= 0)' reaches -2 after the loop upon timeout.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarMaxime Bizon <mbizon@freebox.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ebd6e774
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ static int do_mdio_op(struct bcm_enet_priv *priv, unsigned int data)
		if (enet_readl(priv, ENET_IR_REG) & ENET_IR_MII)
			break;
		udelay(1);
	} while (limit-- >= 0);
	} while (limit-- > 0);

	return (limit < 0) ? 1 : 0;
}