[PATCH] get rid of redundant NULL checks before kfree() in arch/i386/
authorJesper Juhl <juhl-lkml@dif.dk>
Sat, 25 Jun 2005 21:58:48 +0000 (14:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:25:00 +0000 (16:25 -0700)
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
arch/i386/kernel/cpu/mtrr/generic.c
arch/i386/kernel/io_apic.c

index 5c530064eb74bf963a8f43ea4265b96d6042ac65..73a5dc5b26b8403493d099b6b22073561855fa58 100644 (file)
@@ -648,9 +648,7 @@ static int powernow_cpu_exit (struct cpufreq_policy *policy) {
        }
 #endif
 
-       if (powernow_table)
-               kfree(powernow_table);
-
+       kfree(powernow_table);
        return 0;
 }
 
index f468a979e9aab7296d120716c89c60016a3d395e..64d91f73a0a46210db764b885de72fe5d65378c9 100644 (file)
@@ -70,8 +70,7 @@ void __init get_mtrr_state(void)
 /*  Free resources associated with a struct mtrr_state  */
 void __init finalize_mtrr_state(void)
 {
-       if (mtrr_state.var_ranges)
-               kfree(mtrr_state.var_ranges);
+       kfree(mtrr_state.var_ranges);
        mtrr_state.var_ranges = NULL;
 }
 
index fc81c8cddd22e9118013d2b6fb4c84e4b5b00fba..060c4ca4d69f4fa2317cef66a5790ac3b68c1b82 100644 (file)
@@ -632,10 +632,8 @@ static int __init balanced_irq_init(void)
                printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
 failed:
        for (i = 0; i < NR_CPUS; i++) {
-               if(irq_cpu_data[i].irq_delta)
-                       kfree(irq_cpu_data[i].irq_delta);
-               if(irq_cpu_data[i].last_irq)
-                       kfree(irq_cpu_data[i].last_irq);
+               kfree(irq_cpu_data[i].irq_delta);
+               kfree(irq_cpu_data[i].last_irq);
        }
        return 0;
 }