diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-06 16:07:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:53:39 -0400 |
commit | 6e2fff50a5bd72a3f9e6f3ef6e9137efddb2d580 (patch) | |
tree | 1c637e0fb24f59a09cfe008923d5512797cb9f83 | |
parent | 7e495529b62cf462eb2d8875fe15ca446b8e1f94 (diff) |
x86: ioapic: Cleanup get_one_free_irq_cfg()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 43030995dcce..452f781a042e 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -185,19 +185,18 @@ static struct irq_cfg *get_one_free_irq_cfg(int node) | |||
185 | struct irq_cfg *cfg; | 185 | struct irq_cfg *cfg; |
186 | 186 | ||
187 | cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); | 187 | cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); |
188 | if (cfg) { | 188 | if (!cfg) |
189 | if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { | 189 | return NULL; |
190 | kfree(cfg); | 190 | if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) |
191 | cfg = NULL; | 191 | goto out_cfg; |
192 | } else if (!zalloc_cpumask_var_node(&cfg->old_domain, | 192 | if (!zalloc_cpumask_var_node(&cfg->old_domain, GFP_ATOMIC, node)) |
193 | GFP_ATOMIC, node)) { | 193 | goto out_domain; |
194 | free_cpumask_var(cfg->domain); | ||
195 | kfree(cfg); | ||
196 | cfg = NULL; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | return cfg; | 194 | return cfg; |
195 | out_domain: | ||
196 | free_cpumask_var(cfg->domain); | ||
197 | out_cfg: | ||
198 | kfree(cfg); | ||
199 | return NULL; | ||
201 | } | 200 | } |
202 | 201 | ||
203 | int arch_init_chip_data(struct irq_desc *desc, int node) | 202 | int arch_init_chip_data(struct irq_desc *desc, int node) |