Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264429
b: refs/heads/master
c: e659922
h: refs/heads/master
i:
  264427: 740ae1a
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Oct 19, 2011
1 parent 5fae160 commit f90ad5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bb9efe4bab8a877cdde5c6bfbfa202645517571
refs/heads/master: e6599225db36bbdc991d1cc8fbfcacb24f86cdb5
10 changes: 7 additions & 3 deletions trunk/arch/x86/pci/xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
"pcifront-msi-x" :
"pcifront-msi",
DOMID_SELF);
if (irq < 0)
if (irq < 0) {
ret = irq;
goto free;
}
i++;
}
kfree(v);
Expand Down Expand Up @@ -221,8 +223,10 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
if (msg.data != XEN_PIRQ_MSI_DATA ||
xen_irq_from_pirq(pirq) < 0) {
pirq = xen_allocate_pirq_msi(dev, msidesc);
if (pirq < 0)
if (pirq < 0) {
irq = -ENODEV;
goto error;
}
xen_msi_compose_msg(dev, pirq, &msg);
__write_msi_msg(msidesc, &msg);
dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq);
Expand All @@ -244,7 +248,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
error:
dev_err(&dev->dev,
"Xen PCI frontend has not registered MSI/MSI-X support!\n");
return -ENODEV;
return irq;
}

#ifdef CONFIG_XEN_DOM0
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ static int __must_check xen_allocate_irq_dynamic(void)

irq = irq_alloc_desc_from(first, -1);

xen_irq_init(irq);
if (irq >= 0)
xen_irq_init(irq);

return irq;
}
Expand Down Expand Up @@ -713,7 +714,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
mutex_lock(&irq_mapping_update_lock);

irq = xen_allocate_irq_dynamic();
if (irq == -1)
if (irq < 0)
goto out;

irq_set_chip_and_handler_name(irq, &xen_pirq_chip, handle_edge_irq,
Expand All @@ -729,7 +730,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
error_irq:
mutex_unlock(&irq_mapping_update_lock);
xen_free_irq(irq);
return -1;
return ret;
}
#endif

Expand Down

0 comments on commit f90ad5e

Please sign in to comment.