aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/intel_cacheinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/cpu/intel_cacheinfo.c')
-rw-r--r--arch/i386/kernel/cpu/intel_cacheinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c
index d5a456d27d82..db6c25aa5776 100644
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -515,7 +515,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
515 515
516 cpuid4_info[cpu] = kzalloc( 516 cpuid4_info[cpu] = kzalloc(
517 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL); 517 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
518 if (unlikely(cpuid4_info[cpu] == NULL)) 518 if (cpuid4_info[cpu] == NULL)
519 return -ENOMEM; 519 return -ENOMEM;
520 520
521 oldmask = current->cpus_allowed; 521 oldmask = current->cpus_allowed;
@@ -748,6 +748,8 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
748 unsigned int cpu = sys_dev->id; 748 unsigned int cpu = sys_dev->id;
749 unsigned long i; 749 unsigned long i;
750 750
751 if (cpuid4_info[cpu] == NULL)
752 return;
751 for (i = 0; i < num_cache_leaves; i++) { 753 for (i = 0; i < num_cache_leaves; i++) {
752 cache_remove_shared_cpu_map(cpu, i); 754 cache_remove_shared_cpu_map(cpu, i);
753 kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); 755 kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));