summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2006-04-20 10:11:09 -0700
committerTony Luck <tony.luck@intel.com>2006-04-20 10:11:09 -0700
commitcbf283c048798ada7e062892b21de85fb5727243 (patch)
treeff090ca3c3722d056df7953da19b629b82796560
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>
-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 b47476d655f..e9b628ba64e 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 = {
static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu)
{
- if (all_cpu_cache_info[cpu].cache_leaves) {
- kfree(all_cpu_cache_info[cpu].cache_leaves);
- all_cpu_cache_info[cpu].cache_leaves = NULL;
- }
+ kfree(all_cpu_cache_info[cpu].cache_leaves);
+ all_cpu_cache_info[cpu].cache_leaves = NULL;
all_cpu_cache_info[cpu].num_cache_leaves = 0;
memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject));
-
return;
}
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 94211429fd0..2a89cfce495 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)
}
if (L1_CACHE_ALIGN(len) > buf_len) {
- if (buf_base != NULL) {
- kfree(buf_base);
- }
+ kfree(buf_base);
buf_len = L1_CACHE_ALIGN(len);
buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len,
GFP_KERNEL, &buf_base);
@@ -159,9 +157,7 @@ xpc_get_rsvd_page_pa(int nasid)
}
}
- if (buf_base != NULL) {
- kfree(buf_base);
- }
+ kfree(buf_base);
if (status != SALRET_OK) {
rp_pa = 0;