powerpc/irq: Always free duplicate IRQ_LEGACY hosts
[cascardo/linux.git] / arch / powerpc / kernel / irq.c
index a24d37d..0df2554 100644 (file)
@@ -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);
-                       }
+                       of_node_put(host->of_node);
+                       kfree(host);
                        return NULL;
                }
                irq_map[0].host = host;
@@ -727,9 +720,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
        }
        pr_debug("irq: -> using host @%p\n", host);
 
-       /* Check if mapping already exist, if it does, call
-        * host->ops->map() to update the flags
-        */
+       /* Check if mapping already exists */
        virq = irq_find_mapping(host, hwirq);
        if (virq != NO_IRQ) {
                pr_debug("irq: -> existing mapping on virq %d\n", virq);