Hello there,
I just ran the sourceforge tool cppcheck over the source code of the new Linux kernel 2.6.34-rc1 It said [./macintosh/windfarm_pm81.c:760]: (style) Redundant condition. It is safe to deallocate a NULL poin ter [./macintosh/windfarm_pm81.c:762]: (style) Redundant condition. It is safe to deallocate a NULL poin ter The source code is /* Destroy control loops state structures */ if (wf_smu_sys_fans) kfree(wf_smu_sys_fans); if (wf_smu_cpu_fans) kfree(wf_smu_cpu_fans); Proposed patch file attached. Regards David Binderman _________________________________________________________________ Send us your Hotmail stories and be featured in our newsletter http://clk.atdmt.com/UKM/go/195013117/direct/01/
Signed-off-by: David Binderman <dcb...@hotmail.com> --- macintosh/windfarm_pm81.c.sav 2010-03-19 08:57:22.000000000 +0000 +++ macintosh/windfarm_pm81.c 2010-03-19 08:57:34.000000000 +0000 @@ -757,10 +757,8 @@ static int __devexit wf_smu_remove(struc wf_put_control(cpufreq_clamp); /* Destroy control loops state structures */ - if (wf_smu_sys_fans) - kfree(wf_smu_sys_fans); - if (wf_smu_cpu_fans) - kfree(wf_smu_cpu_fans); + kfree(wf_smu_sys_fans); + kfree(wf_smu_cpu_fans); return 0; }
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev