forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
5fc7d61aee
commit
0c0b3ae68e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user