summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-11-12 15:54:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-12 15:54:39 -0800
commitb5c551043617ecf84ad6bb888f96fdf4e4769d4c (patch)
tree2c2f7711f1e6c46446062e7531563491b10f6195 /arch
parenta0a6da1a735ba66c04019b39cca8f79008d6c434 (diff)
parentb74831e6437c0cbbd310dc587579390a146dc7a0 (diff)
downloadlinux-3.10-b5c551043617ecf84ad6bb888f96fdf4e4769d4c.tar.gz
linux-3.10-b5c551043617ecf84ad6bb888f96fdf4e4769d4c.tar.bz2
linux-3.10-b5c551043617ecf84ad6bb888f96fdf4e4769d4c.zip
Merge branch 'stable/xen-pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/xen-pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: MAINTAINERS: Mark XEN lists as moderated xen-pcifront: fix PCI reference leak xen-pcifront: Remove duplicate inclusion of headers. xen: fix memory leak in Xen PCI MSI/MSI-X allocator. MAINTAINERS: Update mailing list name for Xen pieces.
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/pci/xen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 117f5b8daf7..d7b5109f7a9 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -147,8 +147,10 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
irq = xen_allocate_pirq(v[i], 0, /* not sharable */
(type == PCI_CAP_ID_MSIX) ?
"pcifront-msi-x" : "pcifront-msi");
- if (irq < 0)
- return -1;
+ if (irq < 0) {
+ ret = -1;
+ goto free;
+ }
ret = set_irq_msi(irq, msidesc);
if (ret)
@@ -164,7 +166,7 @@ error:
if (ret == -ENODEV)
dev_err(&dev->dev, "Xen PCI frontend has not registered" \
" MSI/MSI-X support!\n");
-
+free:
kfree(v);
return ret;
}