aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
authorRoel Kluin <12o3l@tiscali.nl>2007-11-05 17:55:02 -0500
committerJeff Garzik <jeff@garzik.org>2007-11-10 04:25:12 -0500
commita2a1c3eb4029aa7f17533fe7e9a917a7b3349644 (patch)
treec1680a1f829e27c9815241f0e702d0bf2fdce4c6 /drivers/net/wireless/ipw2100.c
parent2493d8e4166fa75ccb8e49fdd000f9ef67e570ae (diff)
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: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 8d53d08b9691..fc6cdd8086c1 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
1267 IPW2100_INTA_FATAL_ERROR | 1267 IPW2100_INTA_FATAL_ERROR |
1268 IPW2100_INTA_PARITY_ERROR); 1268 IPW2100_INTA_PARITY_ERROR);
1269 } 1269 }
1270 } while (i--); 1270 } while (--i);
1271 1271
1272 /* Clear out any pending INTAs since we aren't supposed to have 1272 /* Clear out any pending INTAs since we aren't supposed to have
1273 * interrupts enabled at this point... */ 1273 * interrupts enabled at this point... */
@@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv)
1339 1339
1340 if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED) 1340 if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED)
1341 break; 1341 break;
1342 } while (i--); 1342 } while (--i);
1343 1343
1344 priv->status &= ~STATUS_RESET_PENDING; 1344 priv->status &= ~STATUS_RESET_PENDING;
1345 1345