public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: Andrew Morton <akpm@osdl.org>
Cc: support@comtrol.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] release_region in RocketPort char driver
Date: Tue, 14 Oct 2003 11:44:09 -0200	[thread overview]
Message-ID: <3F8BFDA9.5090403@terra.com.br> (raw)
In-Reply-To: <20031012173117.35bd221c.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

	Hi Andrew,

Andrew Morton wrote:
> Felipe W Damasio <felipewd@terra.com.br> wrote:
> 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).

	Right.

	Please review this patch, then.

	Against 2.6.0-test7.

	Thanks,

Felipe

[-- Attachment #2: rocket-release_region.patch --]
[-- Type: text/plain, Size: 612 bytes --]

--- linux-2.6.0-test7/drivers/char/rocket.c.orig	2003-10-14 11:38:44.000000000 -0200
+++ linux-2.6.0-test7/drivers/char/rocket.c	2003-10-14 11:42:40.000000000 -0200
@@ -2466,6 +2466,8 @@
 	if (retval < 0) {
 		printk(KERN_INFO "Couldn't install tty RocketPort driver (error %d)\n", -retval);
 		put_tty_driver(rocket_driver);
+		if (controller)
+			release_region (controller, 4);
 		return -1;
 	}
 
@@ -2497,6 +2499,8 @@
 		del_timer_sync(&rocket_timer);
 		tty_unregister_driver(rocket_driver);
 		put_tty_driver(rocket_driver);
+		if (controller) 
+			release_region (controller, 4);
 		return -ENXIO;
 	}
 

      reply	other threads:[~2003-10-14 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-06 14:05 [PATCH] release_region in RocketPort char driver Felipe W Damasio
2003-10-13  0:31 ` Andrew Morton
2003-10-14 13:44   ` Felipe W Damasio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F8BFDA9.5090403@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=support@comtrol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox