From 8f12b1957a936be9f1ab22f31efdfe0691380df6 Mon Sep 17 00:00:00 2001 From: "dilinger@debian.org" Date: Fri, 18 Mar 2005 21:43:33 -0800 Subject: [PATCH] [PATCH] Possible VIA-Rhine free irq issue 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. Updated to CodingStyle. Signed-off-by: Jeff Garzik Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- drivers/net/via-rhine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index b48c1e315c6f5..f553ba701e6b9 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -1197,8 +1197,10 @@ static int rhine_open(struct net_device *dev) dev->name, rp->pdev->irq); rc = alloc_ring(dev); - if (rc) + if (rc) { + free_irq(rp->pdev->irq, dev); return rc; + } alloc_rbufs(dev); alloc_tbufs(dev); rhine_chip_reset(dev); -- 2.47.2