aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/topology.c')
-rw-r--r--arch/ia64/kernel/topology.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index b47476d655f1..4f3a16b37f8f 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -305,13 +305,10 @@ static struct kobj_type cache_ktype_percpu_entry = {
305 305
306static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu) 306static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu)
307{ 307{
308 if (all_cpu_cache_info[cpu].cache_leaves) { 308 kfree(all_cpu_cache_info[cpu].cache_leaves);
309 kfree(all_cpu_cache_info[cpu].cache_leaves); 309 all_cpu_cache_info[cpu].cache_leaves = NULL;
310 all_cpu_cache_info[cpu].cache_leaves = NULL;
311 }
312 all_cpu_cache_info[cpu].num_cache_leaves = 0; 310 all_cpu_cache_info[cpu].num_cache_leaves = 0;
313 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); 311 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject));
314
315 return; 312 return;
316} 313}
317 314
@@ -429,7 +426,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
429 * When a cpu is hot-plugged, do a check and initiate 426 * When a cpu is hot-plugged, do a check and initiate
430 * cache kobject if necessary 427 * cache kobject if necessary
431 */ 428 */
432static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, 429static int cache_cpu_callback(struct notifier_block *nfb,
433 unsigned long action, void *hcpu) 430 unsigned long action, void *hcpu)
434{ 431{
435 unsigned int cpu = (unsigned long)hcpu; 432 unsigned int cpu = (unsigned long)hcpu;