Skip to contentSkip to conversation

atarilance: timeout ignored in lance_open()

PATCH Applied Roel Kluin 2 participants 2 messages Dec 27, 2009 – Jan 4, 2010

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 atarilance: timeout ignored in lance_open()

With `while (--i > 0)' i reaches 0 after the loop, so upon timeout the error was not issued.

---
 drivers/net/atarilance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/atarilance.c +1 -1
index c5721cb..cc9ed86 100644
@@ -663,7 +663,7 @@ static int lance_open( struct net_device *dev )
 	while (--i > 0)
 		if (DREG & CSR0_IDON)
 			break;
-	if (i < 0 || (DREG & CSR0_ERR)) {
+	if (i <= 0 || (DREG & CSR0_ERR)) {
 		DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n",
 					  dev->name, i, DREG ));
 		DREG = CSR0_STOP;