Commit a2a1c3eb authored by Roel Kluin's avatar Roel Kluin Committed by Jeff Garzik

ipw2100: fix postfix decrement errors

If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1.
Testing for 'i == 0', later in the function, will not fulfill its purpose.
Signed-off-by: default avatarRoel Kluin <12o3l@tiscali.nl>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2493d8e4
...@@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) ...@@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
IPW2100_INTA_FATAL_ERROR | IPW2100_INTA_FATAL_ERROR |
IPW2100_INTA_PARITY_ERROR); IPW2100_INTA_PARITY_ERROR);
} }
} while (i--); } while (--i);
/* Clear out any pending INTAs since we aren't supposed to have /* Clear out any pending INTAs since we aren't supposed to have
* interrupts enabled at this point... */ * interrupts enabled at this point... */
...@@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv) ...@@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv)
if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED) if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED)
break; break;
} while (i--); } while (--i);
priv->status &= ~STATUS_RESET_PENDING; priv->status &= ~STATUS_RESET_PENDING;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment