提交 4ae6673e 编写于 作者: J Jesper Juhl 提交者: Linus Torvalds

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

Signed-off-by: NJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5a6b454f
...@@ -648,9 +648,7 @@ static int powernow_cpu_exit (struct cpufreq_policy *policy) { ...@@ -648,9 +648,7 @@ static int powernow_cpu_exit (struct cpufreq_policy *policy) {
} }
#endif #endif
if (powernow_table)
kfree(powernow_table); kfree(powernow_table);
return 0; return 0;
} }
......
...@@ -70,7 +70,6 @@ void __init get_mtrr_state(void) ...@@ -70,7 +70,6 @@ void __init get_mtrr_state(void)
/* Free resources associated with a struct mtrr_state */ /* Free resources associated with a struct mtrr_state */
void __init finalize_mtrr_state(void) 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; mtrr_state.var_ranges = NULL;
} }
......
...@@ -632,9 +632,7 @@ static int __init balanced_irq_init(void) ...@@ -632,9 +632,7 @@ static int __init balanced_irq_init(void)
printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
failed: failed:
for (i = 0; i < NR_CPUS; i++) { for (i = 0; i < NR_CPUS; i++) {
if(irq_cpu_data[i].irq_delta)
kfree(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].last_irq);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册