X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Firq%2Fmsi.c;h=474de5cb394d3c2007135c788a5c40c973e34c6a;hb=61f06db00e06b436dca4725c200c891ae8a4a92d;hp=3e18163f336f2457bf999c87386fb12290e9ed6e;hpb=dacff834fa20b213c258175b7745a55eb35ea5b3;p=karo-tx-linux.git diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 3e18163f336f..474de5cb394d 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -310,8 +310,15 @@ void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) struct msi_desc *desc; for_each_msi_entry(desc, dev) { - irq_domain_free_irqs(desc->irq, desc->nvec_used); - desc->irq = 0; + /* + * We might have failed to allocate an MSI early + * enough that there is no IRQ associated to this + * entry. If that's the case, don't do anything. + */ + if (desc->irq) { + irq_domain_free_irqs(desc->irq, desc->nvec_used); + desc->irq = 0; + } } }