]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] Remove redundant NULL checks before kfree
authorJesper Juhl <jesper.juhl@gmail.com>
Thu, 20 Apr 2006 17:11:09 +0000 (10:11 -0700)
committerTony Luck <tony.luck@intel.com>
Thu, 20 Apr 2006 17:11:09 +0000 (10:11 -0700)
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/topology.c
arch/ia64/sn/kernel/xpc_partition.c

index b47476d655f131122ec1092e5ba6d25827b9c999..e9b628ba64e5b7a8c63881b206dc11f16ddfc719 100644 (file)
@@ -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;
 }
 
index 94211429fd0c0c821b445873c2b51c5edbc0f317..2a89cfce495440f6a0f4c2f0b5ed17158bb04a88 100644 (file)
@@ -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;