From: Roel Kluin Date: Fri, 13 Feb 2009 00:40:20 +0000 (-0800) Subject: sun3: print when lance_open() fails X-Git-Tag: v2.6.29-rc5~3^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cff71e89a8bd1175962b603f88f333883726b851;p=thirdparty%2Fkernel%2Flinux.git sun3: print when lance_open() fails With while (--i > 0) { ... } i reaches 0; print when lance_open() fails Signed-off-by: Roel Kluin Signed-off-by: David S. Miller --- diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 4bb8f72c65cce..e5beb299cbd01 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c @@ -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;