aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/gianfar_mii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index ebcfb27a904e..906aba2757e7 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -136,12 +136,12 @@ static int gfar_mdio_reset(struct mii_bus *bus)
136 136
137 /* Wait until the bus is free */ 137 /* Wait until the bus is free */
138 while ((gfar_read(&regs->miimind) & MIIMIND_BUSY) && 138 while ((gfar_read(&regs->miimind) & MIIMIND_BUSY) &&
139 timeout--) 139 --timeout)
140 cpu_relax(); 140 cpu_relax();
141 141
142 mutex_unlock(&bus->mdio_lock); 142 mutex_unlock(&bus->mdio_lock);
143 143
144 if(timeout <= 0) { 144 if(timeout == 0) {
145 printk(KERN_ERR "%s: The MII Bus is stuck!\n", 145 printk(KERN_ERR "%s: The MII Bus is stuck!\n",
146 bus->name); 146 bus->name);
147 return -EBUSY; 147 return -EBUSY;