aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-01-27 03:00:01 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-30 09:36:01 -0500
commit0c0b3ae68ec93b1db5c637d294647d1cca0df763 (patch)
treed865c12ab25c8eb235342c46bfd3ad60c1bfb384
parent5fc7d61aee1a7f7d3448f8fbccaa93371ebeecb0 (diff)
net: ifb error path loop fix
On error we should start freeing resources at [i-1] not [i-2]. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/ifb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index ca2b21f9d444..c4ca7c930a46 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -271,8 +271,7 @@ static int __init ifb_init_module(void)
271 for (i = 0; i < numifbs && !err; i++) 271 for (i = 0; i < numifbs && !err; i++)
272 err = ifb_init_one(i); 272 err = ifb_init_one(i);
273 if (err) { 273 if (err) {
274 i--; 274 while (i--)
275 while (--i >= 0)
276 ifb_free_one(i); 275 ifb_free_one(i);
277 } 276 }
278 277