public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Possible VIA-Rhine free irq issue
@ 2005-02-28 13:50 Panagiotis Issaris
  2005-03-02  6:22 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Panagiotis Issaris @ 2005-02-28 13:50 UTC (permalink / raw)
  To: linux-kernel

Hi,

It seems to me that in the VIA Rhine device driver the requested irq might
not be freed in case the alloc_ring() function fails. alloc_ring()
can fail with a ENOMEM return value because of possible
pci_alloc_consistent() failures.

This patch applies to 2.6.11-rc5-bk2.

diff -uprN linux-2.6.11-rc5-bk2/drivers/net/via-rhine.c linux-2.6.11-rc5-bk2-pi/drivers/net/via-rhine.c
--- linux-2.6.11-rc5-bk2/drivers/net/via-rhine.c	2005-02-28 13:44:37.000000000 +0100
+++ linux-2.6.11-rc5-bk2-pi/drivers/net/via-rhine.c	2005-02-28 13:44:31.000000000 +0100
@@ -1198,7 +1198,10 @@ static int rhine_open(struct net_device 
 
 	rc = alloc_ring(dev);
 	if (rc)
+	{
+		free_irq(rp->pdev->irq, dev);
 		return rc;
+	}
 	alloc_rbufs(dev);
 	alloc_tbufs(dev);
 	rhine_chip_reset(dev);


With friendly regards,
Takis
-- 
OpenPGP key: http://lumumba.luc.ac.be/takis/takis_public_key.txt
fingerprint: 6571 13A3 33D9 3726 F728  AA98 F643 B12E ECF3 E029

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

end of thread, other threads:[~2005-03-02  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 13:50 [PATCH] Possible VIA-Rhine free irq issue Panagiotis Issaris
2005-03-02  6:22 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox