netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [janitor] depca: release resources on errors
@ 2004-01-25  6:31 Randy.Dunlap
  2004-01-25 16:36 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2004-01-25  6:31 UTC (permalink / raw)
  To: netdev; +Cc: jgarzik


Hi,
Please apply to 2.6.current.

Thanks,
--
~Randy

From: Leann Ogasawara <ogasawara@osdl.org>


Hi All,

Inserts missing iounmap's and release_mem_region's.  Appreciate
feedback.

Leann

diffed against 2.6.1  

===== drivers/net/depca.c 1.20 vs edited =====

diff -puN drivers/net/depca.c~depca_iounmap drivers/net/depca.c

diff -puN drivers/net/depca.c~depca_iounmap drivers/net/depca.c


 linux-262-rc1-bk1-rddunlap/drivers/net/depca.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN drivers/net/depca.c~depca_iounmap drivers/net/depca.c
--- linux-262-rc1-bk1/drivers/net/depca.c~depca_iounmap	2004-01-23 15:49:48.000000000 -0800
+++ linux-262-rc1-bk1-rddunlap/drivers/net/depca.c	2004-01-23 15:49:48.000000000 -0800
@@ -771,6 +771,8 @@ static int __init depca_hw_init (struct 
 		status = -ENXIO;
 		if (!irqnum) {
 			printk(" and failed to detect IRQ line.\n");
+			iounmap(lp->sh_mem);
+			release_mem_region(mem_start, mem_len);
 			goto out_priv;
 		} else {
 			for (dev->irq = 0, i = 0; (depca_irq[i]) && (!dev->irq); i++)
@@ -781,6 +783,8 @@ static int __init depca_hw_init (struct 
 
 			if (!dev->irq) {
 				printk(" but incorrect IRQ line detected.\n");
+				iounmap(lp->sh_mem);
+				release_mem_region(mem_start, mem_len);
 				return -ENXIO;
 			}
 		}

_

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-30  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-25  6:31 [janitor] depca: release resources on errors Randy.Dunlap
2004-01-25 16:36 ` Jeff Garzik
2004-01-26  3:30   ` Randy.Dunlap
2004-01-26  4:25     ` Jeff Garzik
2004-01-30  2:14       ` Leann Ogasawara

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).