aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_pm81.c
diff options
context:
space:
mode:
authord binderman <dcb314@hotmail.com>2010-03-18 19:01:42 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-04-07 04:00:38 -0400
commit6d1bdd2afbed74b3adcf3a7aec49e430eeb6c5f3 (patch)
tree051d1706de2a7e25fbd913ae67fe8150ff708f00 /drivers/macintosh/windfarm_pm81.c
parent213972e9faf8a16b27fee01ae7c7071de5080268 (diff)
powerpc/pmac/windfarm: Don't test pointers before kfree()
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>
Diffstat (limited to 'drivers/macintosh/windfarm_pm81.c')
-rw-r--r--drivers/macintosh/windfarm_pm81.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c
index 565d5b2adc95..e6e46a227698 100644
--- a/drivers/macintosh/windfarm_pm81.c
+++ b/drivers/macintosh/windfarm_pm81.c
@@ -757,10 +757,8 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
757 wf_put_control(cpufreq_clamp); 757 wf_put_control(cpufreq_clamp);
758 758
759 /* Destroy control loops state structures */ 759 /* Destroy control loops state structures */
760 if (wf_smu_sys_fans) 760 kfree(wf_smu_sys_fans);
761 kfree(wf_smu_sys_fans); 761 kfree(wf_smu_cpu_fans);
762 if (wf_smu_cpu_fans)
763 kfree(wf_smu_cpu_fans);
764 762
765 return 0; 763 return 0;
766} 764}