linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Walter <srwalter@yahoo.com>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk
Subject: [RFC][PATCH] (1/3) unchecked requst_region's in drivers/net
Date: Sun, 13 Jan 2002 00:18:19 -0600	[thread overview]
Message-ID: <20020113001819.A26730@hapablap.dyn.dhs.org> (raw)

Alright, here are the obvious patches, which I'm sending seperately as
Alan requested.  The next message will have those patches which are
approved by their respective maintainers, and the last those patches for
drivers whose maintainers didn't respond.  Those will likely require
more scrutiny.

Andrew, I have (hopefully) addressed all the issues you brought up in
the patches.
-- 
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell
He's alive.  He's alive!  Oh, that fellow at RadioShack said I was mad!
Well, who's mad now?
			-- Montgomery C. Burns

diff -Nru clean-2.4.17//drivers/net/irda/ali-ircc.c linux/drivers/net/irda/ali-ircc.c
--- clean-2.4.17//drivers/net/irda/ali-ircc.c	Mon Nov  5 19:23:13 2001
+++ linux/drivers/net/irda/ali-ircc.c	Thu Dec 27 14:08:34 2001
@@ -291,15 +291,13 @@
         self->io.fifo_size = 16;		/* SIR: 16, FIR: 32 Benjamin 2000/11/1 */
 	
 	/* Reserve the ioports that we need */
-	ret = check_region(self->io.fir_base, self->io.fir_ext);
-	if (ret < 0) { 
+	if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) {
 		WARNING(__FUNCTION__ "(), can't get iobase of 0x%03x\n",
 			self->io.fir_base);
 		dev_self[i] = NULL;
 		kfree(self);
 		return -ENODEV;
 	}
-	request_region(self->io.fir_base, self->io.fir_ext, driver_name);
 
 	/* Initialize QoS for this device */
 	irda_init_max_qos_capabilies(&self->qos);
diff -Nru clean-2.4.17//drivers/net/wan/comx-hw-locomx.c linux/drivers/net/wan/comx-hw-locomx.c
--- clean-2.4.17//drivers/net/wan/comx-hw-locomx.c	Mon Nov  5 19:22:12 2001
+++ linux/drivers/net/wan/comx-hw-locomx.c	Thu Dec 27 14:20:11 2001
@@ -154,11 +154,9 @@
 		return -ENODEV;
 	}
 
-	if (check_region(dev->base_addr, hw->io_extent)) {
+	if (!request_region(dev->base_addr, hw->io_extent, dev->name)) {
 		return -EAGAIN;
 	}
-
-	request_region(dev->base_addr, hw->io_extent, dev->name);
 
 	hw->board.chanA.ctrlio=dev->base_addr + 5;
 	hw->board.chanA.dataio=dev->base_addr + 7;
--- linux/drivers/net/irda/irport.c~	Sat Jan 12 21:24:24 2002
+++ linux/drivers/net/irda/irport.c	Sat Jan 12 21:24:57 2002
@@ -169,13 +169,12 @@
         self->io.fifo_size = 16;
 
 	/* Lock the port that we need */
-	ret = check_region(self->io.sir_base, self->io.sir_ext);
-	if (ret < 0) { 
+	if (!request_region(self->io.sir_base, self->io.sir_ext, driver_name)) {
 		IRDA_DEBUG(0, __FUNCTION__ "(), can't get iobase of 0x%03x\n",
 			   self->io.sir_base);
+		kfree(self);
 		return NULL;
 	}
-	request_region(self->io.sir_base, self->io.sir_ext, driver_name);
 
 	/* Initialize QoS for this device */
 	irda_init_max_qos_capabilies(&self->qos);

                 reply	other threads:[~2002-01-13  6:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020113001819.A26730@hapablap.dyn.dhs.org \
    --to=srwalter@yahoo.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).