Skip to contentSkip to conversation

niu: timeout ignored in tcam_wait_bit()

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 niu: timeout ignored in tcam_wait_bit()

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

---

drivers/net/niu.c +1 -1
index 8ce58c4..2aed2b3 100644
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)
 			break;
 		udelay(1);
 	}
-	if (limit < 0)
+	if (limit <= 0)
 		return -ENODEV;
 
 	return 0;