mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04: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 <[email protected]> Cc: Jeff Garzik <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
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