|
@@ -1170,8 +1170,10 @@ static int tegra_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
|
|
|
return hwirq;
|
|
return hwirq;
|
|
|
|
|
|
|
|
irq = irq_create_mapping(msi->domain, hwirq);
|
|
irq = irq_create_mapping(msi->domain, hwirq);
|
|
|
- if (!irq)
|
|
|
|
|
|
|
+ if (!irq) {
|
|
|
|
|
+ tegra_msi_free(msi, hwirq);
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
irq_set_msi_desc(irq, desc);
|
|
irq_set_msi_desc(irq, desc);
|
|
|
|
|
|
|
@@ -1189,8 +1191,10 @@ static void tegra_msi_teardown_irq(struct msi_chip *chip, unsigned int irq)
|
|
|
{
|
|
{
|
|
|
struct tegra_msi *msi = to_tegra_msi(chip);
|
|
struct tegra_msi *msi = to_tegra_msi(chip);
|
|
|
struct irq_data *d = irq_get_irq_data(irq);
|
|
struct irq_data *d = irq_get_irq_data(irq);
|
|
|
|
|
+ irq_hw_number_t hwirq = irqd_to_hwirq(d);
|
|
|
|
|
|
|
|
- tegra_msi_free(msi, d->hwirq);
|
|
|
|
|
|
|
+ irq_dispose_mapping(irq);
|
|
|
|
|
+ tegra_msi_free(msi, hwirq);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static struct irq_chip tegra_msi_irq_chip = {
|
|
static struct irq_chip tegra_msi_irq_chip = {
|