Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d1b5e20 authored by Milton Miller's avatar Milton Miller Committed by Benjamin Herrenschmidt
Browse files

powerpc/irq: Always free duplicate IRQ_LEGACY hosts



Since kmem caches are allocated before init_IRQ as noted in 3af259d1
(powerpc: Radix trees are available before init_IRQ), we now call
kmalloc in all cases and can can always call kfree if we are asked
to allocate a duplicate or conflicting IRQ_HOST_MAP_LEGACY host.

Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8142f032
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -557,15 +557,8 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
	if (revmap_type == IRQ_HOST_MAP_LEGACY) {
		if (irq_map[0].host != NULL) {
			raw_spin_unlock_irqrestore(&irq_big_lock, flags);
			/* If we are early boot, we can't free the structure,
			 * too bad...
			 * this will be fixed once slab is made available early
			 * instead of the current cruft
			 */
			if (mem_init_done) {
			of_node_put(host->of_node);
			kfree(host);
			}
			return NULL;
		}
		irq_map[0].host = host;