summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2006-07-21 23:56:02 +0200
committerDavid S. Miller <davem@davemloft.net>2006-07-21 23:56:02 +0200
commit4a9c74e5830444c1c3235848e06402c1d2ece1ea (patch)
tree7a2e828379c30b31b5a458dc4b533c8dc71a19ba
parent[NET]: Fix reversed error test in netif_tx_trylock (diff)
downloadlinux-4a9c74e5830444c1c3235848e06402c1d2ece1ea.tar.xz
linux-4a9c74e5830444c1c3235848e06402c1d2ece1ea.zip
[IFB] After ifb_init_one() failed, i is increased. Decrease
It before entering in the loop for freeing the other ifb devices. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ifb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 3a42afab5036..43e3f33ed5e2 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -271,6 +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)
ifb_free_one(i);
}