Skip to content
Commit 51ce3e21 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

net: phy: mdio-bcm-unimac: fix unsigned wrap-around when decrementing timeout



Change post-decrement compare to pre-decrement to avoid an
unsigned integer wrap-around on timeout. This leads to the following
!timeout check to never to be true so -ETIMEDOUT is never returned.

Detected by CoverityScan, CID#1452623 ("Logically dead code")

Fixes: 69a60b05 ("net: phy: mdio-bcm-unimac: factor busy polling loop")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4da18741
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment