Commit 6e2fff50 authored by Thomas Gleixner's avatar Thomas Gleixner

x86: ioapic: Cleanup get_one_free_irq_cfg()

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarIngo Molnar <mingo@elte.hu>
parent 7e495529
...@@ -185,19 +185,18 @@ static struct irq_cfg *get_one_free_irq_cfg(int node) ...@@ -185,19 +185,18 @@ static struct irq_cfg *get_one_free_irq_cfg(int node)
struct irq_cfg *cfg; struct irq_cfg *cfg;
cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node);
if (cfg) { if (!cfg)
if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { return NULL;
kfree(cfg); if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node))
cfg = NULL; goto out_cfg;
} else if (!zalloc_cpumask_var_node(&cfg->old_domain, if (!zalloc_cpumask_var_node(&cfg->old_domain, GFP_ATOMIC, node))
GFP_ATOMIC, node)) { goto out_domain;
return cfg;
out_domain:
free_cpumask_var(cfg->domain); free_cpumask_var(cfg->domain);
out_cfg:
kfree(cfg); kfree(cfg);
cfg = NULL; return NULL;
}
}
return cfg;
} }
int arch_init_chip_data(struct irq_desc *desc, int node) int arch_init_chip_data(struct irq_desc *desc, int node)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment