lkml.org 
[lkml]   [2003]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.708 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site