[RFC][PATCH] (1/3) unchecked requst_region's in drivers/net

Steven Walter (srwalter@yahoo.com)
Sun, 13 Jan 2002 00:18:19 -0600


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); - 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/