From: dilinger@debian.org Date: Sat, 19 Mar 2005 05:43:33 +0000 (-0800) Subject: [PATCH] Possible VIA-Rhine free irq issue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f12b1957a936be9f1ab22f31efdfe0691380df6;p=thirdparty%2Fkernel%2Fstable.git [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 --- 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);