summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pcie-altera-msi.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:53 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:53 -0500
commita89d7e43e1ab04d075469c79bb52383b6280609f (patch)
tree9c1cdca02f97e27bd92598161356e8de22ab73f9 /drivers/pci/host/pcie-altera-msi.c
parent741e2237be94405f03db1ff627a39ef0c086d50d (diff)
parentef75369a5b9afc8b45456218790f0f12906b7065 (diff)
Merge branch 'pci/host-altera' into next
* pci/host-altera: PCI: altera: Fix platform_get_irq() error handling PCI: altera: Use size=4 IRQ domain for legacy INTx PCI: altera: Remove unused num_of_vectors variable
Diffstat (limited to 'drivers/pci/host/pcie-altera-msi.c')
-rw-r--r--drivers/pci/host/pcie-altera-msi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c
index 4e5d628e8cd4..d8141f4865de 100644
--- a/drivers/pci/host/pcie-altera-msi.c
+++ b/drivers/pci/host/pcie-altera-msi.c
@@ -64,13 +64,11 @@ static void altera_msi_isr(struct irq_desc *desc)
struct irq_chip *chip = irq_desc_get_chip(desc);
struct altera_msi *msi;
unsigned long status;
- u32 num_of_vectors;
u32 bit;
u32 virq;
chained_irq_enter(chip, desc);
msi = irq_desc_get_handler_data(desc);
- num_of_vectors = msi->num_of_vectors;
while ((status = msi_readl(msi, MSI_STATUS)) != 0) {
for_each_set_bit(bit, &status, msi->num_of_vectors) {
@@ -267,9 +265,9 @@ static int altera_msi_probe(struct platform_device *pdev)
return ret;
msi->irq = platform_get_irq(pdev, 0);
- if (msi->irq <= 0) {
+ if (msi->irq < 0) {
dev_err(&pdev->dev, "failed to map IRQ: %d\n", msi->irq);
- ret = -ENODEV;
+ ret = msi->irq;
goto err;
}