提交 0c0b3ae6 编写于 作者: M Mariusz Kozlowski 提交者: Jeff Garzik

net: ifb error path loop fix

On error we should start freeing resources at [i-1] not [i-2].
Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 5fc7d61a
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册