On 03/12/2012 02:00 AM, Thierry Reding wrote:
* Stephen Warren wrote:
quoted
On 03/08/2012 07:51 AM, Thierry Reding wrote:
quoted
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
...
quoted
Free the IRQ descriptors in the error paths?
...
quoted
quoted
+ for (msi = 0; msi < INT_PCI_MSI_NR; msi++) {
+ unsigned int irq = irq_find_mapping(pcie->msi_domain, msi);
+
+ irq_set_chip_data(irq, pcie);
+ irq_set_chip_and_handler(irq, &pcie->msi_chip,
+ handle_simple_irq);
+ set_irq_flags(irq, IRQF_VALID);
+ }
+
+ err = platform_get_irq(pdev, 1);
+ if (err < 0) {
+ dev_err(&pdev->dev, "failed to get IRQ: %d\n", err);
Same here, and undo setting IRQF_VALID?
Does it make sense to explicitly unset the IRQF_VALID flag when the IRQ
descriptors are free'd afterwards anyway?
Good point. Probably not per my gut instinct.
...
I'm also Cc'ing Thomas
Gleixner as maintainer of the IRQ subsystem, he probably knows best how
dynamically allocated interrupts should be cleaned up.
But yes, best to check with someone more familiar with interrupts.