Messages in this thread | | | Date | Tue, 18 Nov 2014 15:24:02 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [patch 09/16] genirq: Add generic msi irq domain support |
| |
On Tue, 18 Nov 2014, Yun Wu (Abel) wrote: > On 2014/11/18 20:49, Jiang Liu wrote: > >>> + ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg); > >>> + if (ret < 0) > >>> + return ret; > >>> + > >>> + for (i = 0; i < nr_irqs; i++) { > >>> + ret = ops->msi_init(domain, info, virq + i, hwirq + i, arg); > >>> + if (ret < 0) { > >>> + if (ops->msi_free) { > >>> + for (i--; i > 0; i--) > >> > >> while (i--) ?
The allocation for 'i' failed. So we don't free i. You missed the real bug here:
> >>> + for (i--; i > 0; i--)
Must be i >= 0.
Thanks,
tglx
| |