From: Mariusz Kozlowski Date: Sat, 27 Jan 2007 08:00:01 +0000 (-0800) Subject: net: ifb error path loop fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c0b3ae68ec93b1db5c637d294647d1cca0df763;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: ifb error path loop fix On error we should start freeing resources at [i-1] not [i-2]. Signed-off-by: Mariusz Kozlowski Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index ca2b21f9d444..c4ca7c930a46 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -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); }