Messages in this thread | | | Date | Sun, 12 Oct 2003 17:31:17 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] release_region in RocketPort char driver |
| |
Felipe W Damasio <felipewd@terra.com.br> wrote: > > --- linux-2.6.0-test6/drivers/char/rocket.c.orig 2003-10-06 10:57:29.000000000 -0300 > +++ linux-2.6.0-test6/drivers/char/rocket.c 2003-10-06 11:00:29.000000000 -0300 > @@ -2468,6 +2468,7 @@ > if (retval < 0) { > printk(KERN_INFO "Couldn't install tty RocketPort driver (error %d)\n", -retval); > put_tty_driver(rocket_driver); > + release_region(controller, 4); > return -1; > }
a) If variable `controller' is zero then we never allocated this region, so we should not free it.
b) There is an error exit path further on which also needs to release this region (if controller != 0).
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |