Skip to contentSkip to conversation

sun3: print when lance_open() fails

PATCH Applied Roel Kluin 2 participants 2 messages Feb 11, 2009 – Feb 13, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 sun3: print when lance_open() fails

With while (--i > 0) { ... } i reaches 0; print when lance_open() fails

---

drivers/net/sun3lance.c +1 -1
index 4bb8f72..e5beb29 100644
@@ -428,7 +428,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;