Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9df8f4e3 authored by Steve Glendinning's avatar Steve Glendinning Committed by David S. Miller
Browse files

smsc9420: fix another postfixed timeout



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: default avatarSteve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 494ef10e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");