Remove redundant NULL checks before [kv]free - in arch/
Subsystems (3)
PATCH 3/5 Remove redundant NULL checks before [kv]free - in arch/
Remove redundant NULL checks before [kv]free + small CodingStyle cleanup for arch/
Signed-off-by Jesper Juhl <[email protected]>
---
arch/ia64/kernel/topology.c | 7 -- arch/ia64/sn/kernel/xpc_partition.c | 8 -- arch/powerpc/platforms/powermac/low_i2c.c | 3 arch/um/kernel/irq.c | 93 +++++++++++++++--------------- arch/um/os-Linux/irq.c | 47 +++++++-------- 5 files changed, 74 insertions(+), 84 deletions(-)
arch/ia64/kernel/topology.c +2 -5
@@ -305,13 +305,10 @@ static struct kobj_type cache_ktype_percstatic 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 ; }
arch/ia64/sn/kernel/xpc_partition.c +2 -6
@@ -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 ;
arch/powerpc/platforms/powermac/low_i2c.c +1 -2
@@ -1265,8 +1265,7 @@ static void pmac_i2c_do_end(struct pmf_fif (inst =NULL )return ;pmac_i2c_close (inst->bus); -if (inst) -kfree (inst); +kfree (inst); }static int pmac_i2c_do_read (PMF_STD_ARGS ,u32 len)
arch/um/kernel/irq.c +47 -46
256 lines not on this page · raw message
arch/um/os-Linux/irq.c +22 -25
111 lines not on this page · raw message
Quoted 8 lines · Jesper Juhl
Remove redundant NULL checks before [kv]free + small CodingStyle cleanup for
arch/Signed-off-by Jesper Juhl <[email protected]>---
arch/ia64/kernel/topology.c | 7 -- arch/ia64/sn/kernel/xpc_partition.c | 8 --
Applied ia64 pieces. Thanks.
Quoted 3 lines
arch/powerpc/platforms/powermac/low_i2c.c | 3 arch/um/kernel/irq.c | 93 +++++++++++++++--------------- arch/um/os-Linux/irq.c | 47 +++++++--------
These bits left to fend for themselves in patchspace.
-Tony
Quoted 4 lines · Jesper Juhl
Remove redundant NULL checks before [kv]free + small CodingStyle cleanup for
arch/Signed-off-by Jesper Juhl <[email protected]>
The UML bits are applied, thanks.
Jeff