mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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
1 changed files with 1 additions and 2 deletions
|
@ -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 a new issue