Thread (4 messages) 4 messages, 2 authors, 2010-03-28

Re: question about drivers/macintosh/windfarm_pm91.c

From: Julia Lawall <hidden>
Date: 2010-03-28 21:56:52

On Mon, 29 Mar 2010, Benjamin Herrenschmidt wrote:
On Sun, 2010-03-28 at 17:48 +0200, Julia Lawall wrote:
quoted
The function wf_smu_remove in the file drivers/macintosh/windfarm_pm91.c 
ends with the following code:

        if (wf_smu_slots_fans)
                kfree(wf_smu_cpu_fans);
	if (wf_smu_drive_fans)
                kfree(wf_smu_cpu_fans);
        if (wf_smu_cpu_fans)
                kfree(wf_smu_cpu_fans);

This looks quite strange.  Is it supposed to be if (x) kfree(x); in each 
case?
Definitely a typo. In fact, the if () aren't even necessary. Patch
welcome :-)
I'll send something tomorrow.  I will perhaps keep the ifs, to maintain 
the style of the rest of the function.

julia
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help