]> err.no Git - linux-2.6/commitdiff
net: ifb error path loop fix
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Sat, 27 Jan 2007 08:00:01 +0000 (00:00 -0800)
committerJeff Garzik <jeff@garzik.org>
Tue, 30 Jan 2007 14:36:01 +0000 (09:36 -0500)
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>
drivers/net/ifb.c

index ca2b21f9d44489f4008761764f520f90a8956053..c4ca7c930a46cec4fdcb6187407958224fbf77d4 100644 (file)
@@ -271,8 +271,7 @@ static int __init ifb_init_module(void)
        for (i = 0; i < numifbs && !err; i++)
                err = ifb_init_one(i);
        if (err) {
-               i--;
-               while (--i >= 0)
+               while (i--)
                        ifb_free_one(i);
        }