From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D59B5B7CBD for ; Mon, 29 Mar 2010 08:09:10 +1100 (EST) Subject: Re: question about drivers/macintosh/windfarm_pm91.c From: Benjamin Herrenschmidt To: Julia Lawall In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 29 Mar 2010 08:08:59 +1100 Message-ID: <1269810539.8599.330.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2010-03-28 at 17:48 +0200, Julia Lawall wrote: > 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 :-) Cheers, Ben.