aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2006-04-20 13:11:09 -0400
committerTony Luck <tony.luck@intel.com>2006-04-20 13:11:09 -0400
commitcbf283c048798ada7e062892b21de85fb5727243 (patch)
treeff090ca3c3722d056df7953da19b629b82796560 /arch
parentc6180deb1da5d087341fb5a3c1a15e61492dcd6b (diff)
[IA64] Remove redundant NULL checks before kfree
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/topology.c7
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c8
2 files changed, 4 insertions, 11 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index b47476d655f1..e9b628ba64e5 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
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 94211429fd0c..2a89cfce4954 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -136,9 +136,7 @@ xpc_get_rsvd_page_pa(int nasid)
136 } 136 }
137 137
138 if (L1_CACHE_ALIGN(len) > buf_len) { 138 if (L1_CACHE_ALIGN(len) > buf_len) {
139 if (buf_base != NULL) { 139 kfree(buf_base);
140 kfree(buf_base);
141 }
142 buf_len = L1_CACHE_ALIGN(len); 140 buf_len = L1_CACHE_ALIGN(len);
143 buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len, 141 buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len,
144 GFP_KERNEL, &buf_base); 142 GFP_KERNEL, &buf_base);
@@ -159,9 +157,7 @@ xpc_get_rsvd_page_pa(int nasid)
159 } 157 }
160 } 158 }
161 159
162 if (buf_base != NULL) { 160 kfree(buf_base);
163 kfree(buf_base);
164 }
165 161
166 if (status != SALRET_OK) { 162 if (status != SALRET_OK) {
167 rp_pa = 0; 163 rp_pa = 0;