From: Nicolas Dichtel Date: Fri, 21 Jul 2006 22:09:07 +0000 (-0700) Subject: [DUMMY]: Avoid an oops when dummy_init_one() failed X-Git-Tag: firefly_0821_release~34091^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9ed36279f68c990d65cd3d64f27d81313474a118;p=firefly-linux-kernel-4.4.55.git [DUMMY]: Avoid an oops when dummy_init_one() failed Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller --- diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index 36d511729f71..2146cf74425e 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -132,6 +132,7 @@ static int __init dummy_init_module(void) for (i = 0; i < numdummies && !err; i++) err = dummy_init_one(i); if (err) { + i--; while (--i >= 0) dummy_free_one(i); }