1
0
Fork 0

[PATCH] get rid of redundant NULL checks before kfree() in arch/i386/

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>
hifive-unleashed-5.1
Jesper Juhl 2005-06-25 14:58:48 -07:00 committed by Linus Torvalds
parent 5a6b454f80
commit 4ae6673e02
3 changed files with 4 additions and 9 deletions

View 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;
}

View 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;
}

View 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;
}