Commit 8453cce7 authored by Andres Salomon's avatar Andres Salomon Committed by Greg Kroah-Hartman

[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: default avatarJeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a1c86154
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment