From: d binderman <dcb314@hotmail.com>
To: <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH]: Minor quibble in macintosh/windfarm_pm81.c
Date: Fri, 19 Mar 2010 09:01:42 +0000 [thread overview]
Message-ID: <BLU108-W19BF72C9933FC2647F761B9C2A0@phx.gbl> (raw)
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
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/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bug39.patch --]
[-- Type: text/x-patch, Size: 504 bytes --]
Signed-off-by: David Binderman <dcb314@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;
}
reply other threads:[~2010-03-19 9:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLU108-W19BF72C9933FC2647F761B9C2A0@phx.gbl \
--to=dcb314@hotmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox