Skip to content

Commit

Permalink
smsc9420: fix another postfixed timeout
Browse files Browse the repository at this point in the history
Roel Kluin recently fixed several instances where variables reach -1,
but 0 is tested afterwards.  This patch fixes another, so the timeout
will be correctly detected and a warning printed.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Feb 20, 2009
1 parent 494ef10 commit 9df8f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/smsc9420.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static int smsc9420_eeprom_send_cmd(struct smsc9420_pdata *pd, u32 op)
do {
msleep(1);
e2cmd = smsc9420_reg_read(pd, E2P_CMD);
} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (timeout--));
} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (--timeout));

if (!timeout) {
smsc_info(HW, "TIMED OUT");
Expand Down

0 comments on commit 9df8f4e

Please sign in to comment.