From f5179d75c4de89dc2d0003a2e3d88b98c947e1a4 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sat, 6 Nov 2010 10:06:49 +0100 Subject: [PATCH] --- yaml --- r: 221886 b: refs/heads/master c: 07cf2a64c2ad3408a0e12aa4cd6040b30c09381d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/pci/xen.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index dc07928e88c2..f627a37866ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1688c3d6000b1183bcb604c8c85f742a579990e5 +refs/heads/master: 07cf2a64c2ad3408a0e12aa4cd6040b30c09381d diff --git a/trunk/arch/x86/pci/xen.c b/trunk/arch/x86/pci/xen.c index 117f5b8daf75..d7b5109f7a9c 100644 --- a/trunk/arch/x86/pci/xen.c +++ b/trunk/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 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) if (ret == -ENODEV) dev_err(&dev->dev, "Xen PCI frontend has not registered" \ " MSI/MSI-X support!\n"); - +free: kfree(v); return ret; }