| Submitter | roel kluin |
|---|---|
| Date | Dec. 27, 2009, 2:10 p.m. |
| Message ID | <4B376AF3.6090408@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/41847/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
From: Roel Kluin <roel.kluin@gmail.com> Date: Sun, 27 Dec 2009 15:10:59 +0100 > With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the > error was not returned. > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 8ce58c4..2aed2b3 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -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;
With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the error was not returned. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html