]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
powerpc/pmac/windfarm: Don't test pointers before kfree()
authord binderman <dcb314@hotmail.com>
Thu, 18 Mar 2010 23:01:42 +0000 (23:01 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 7 Apr 2010 08:00:38 +0000 (18:00 +1000)
Fix minor nits found by cppcheck

[./macintosh/windfarm_pm81.c:760]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./macintosh/windfarm_pm81.c:762]: (style) Redundant condition. It is safe to deallocate a NULL pointer

Signed-off-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/macintosh/windfarm_pm81.c

index 565d5b2adc95918e2d89a2076bc6b6441d70a3da..e6e46a227698ec866836dd7ec1ff79b72ffae176 100644 (file)
@@ -757,10 +757,8 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
                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;
 }