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

Commit 2cf0dbed authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller
Browse files

SMSC: timeout reaches -1



With a postfix decrement timeouts will reach -1 rather than 0, so
the error path does not appear.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 196b7e1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1624,7 +1624,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
	do {
		msleep(1);
		e2cmd = smsc911x_reg_read(pdata, E2P_CMD);
	} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (timeout--));
	} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (--timeout));

	if (!timeout) {
		SMSC_TRACE(DRV, "TIMED OUT");