Skip to content

Commit

Permalink
ipw2100: fix postfix decrement errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Jeff Garzik committed Nov 10, 2007
1 parent 2493d8e commit a2a1c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
IPW2100_INTA_FATAL_ERROR |
IPW2100_INTA_PARITY_ERROR);
}
} while (i--);
} while (--i);

/* Clear out any pending INTAs since we aren't supposed to have
* interrupts enabled at this point... */
Expand Down Expand Up @@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv)

if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED)
break;
} while (i--);
} while (--i);

priv->status &= ~STATUS_RESET_PENDING;

Expand Down

0 comments on commit a2a1c3e

Please sign in to comment.