diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-15 08:58:26 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-24 02:04:24 +0200 |
commit | 79f5599772ac2f138d7a75b8f3f06a93f09c75f7 (patch) | |
tree | 092c9f6e3f7c49d8f5bb9f3d39752ae7cfb9415a /arch/x86/kernel/apic | |
parent | Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/... (diff) | |
download | linux-79f5599772ac2f138d7a75b8f3f06a93f09c75f7.tar.xz linux-79f5599772ac2f138d7a75b8f3f06a93f09c75f7.zip |
cpumask: use zalloc_cpumask_var() where possible
Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 64970b9885f2..dc69f28489f5 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -227,17 +227,14 @@ static struct irq_cfg *get_one_free_irq_cfg(int node) cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); if (cfg) { - if (!alloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { + if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { kfree(cfg); cfg = NULL; - } else if (!alloc_cpumask_var_node(&cfg->old_domain, + } else if (!zalloc_cpumask_var_node(&cfg->old_domain, GFP_ATOMIC, node)) { free_cpumask_var(cfg->domain); kfree(cfg); cfg = NULL; - } else { - cpumask_clear(cfg->domain); - cpumask_clear(cfg->old_domain); } } |