From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbZIOPre (ORCPT ); Tue, 15 Sep 2009 11:47:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754848AbZIOPra (ORCPT ); Tue, 15 Sep 2009 11:47:30 -0400 Received: from mgw1.diku.dk ([130.225.96.91]:39377 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754820AbZIOPrZ (ORCPT ); Tue, 15 Sep 2009 11:47:25 -0400 Date: Tue, 15 Sep 2009 17:47:26 +0200 (CEST) From: Julia Lawall To: Atsushi Nemoto Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/8] arch/mips/txx9: introduce missing kfree, iounmap In-Reply-To: <20090916.004525.74746264.anemo@mba.ocn.ne.jp> Message-ID: References: <20090914.003321.160496287.anemo@mba.ocn.ne.jp> <20090916.004525.74746264.anemo@mba.ocn.ne.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Sep 2009, Atsushi Nemoto wrote: > On Tue, 15 Sep 2009 07:03:42 +0200 (CEST), Julia Lawall wrote: > > > +out_pdev: > > > + platform_device_put(pdev); > > > +out_gpio: > > > + gpio_remove(&iocled->chip); > > > > I just noticed that the prototype of gpio_remove has __must_check > > I don't think there is anything to check here; since the thing is not > > fully initialized here, it is unlikely to be busy. Should there be (void) > > in front of it? > > The void casting does not silence the warning. How about this? > > if (gpiochip_remove(&iocled->chip)) > return; > > In general, memory leak would be less serious than crash or data > corruption ;) OK, I will send an updated patch shortly. julia From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Tue, 15 Sep 2009 15:47:26 +0000 Subject: Re: [PATCH 1/8] arch/mips/txx9: introduce missing kfree, iounmap Message-Id: List-Id: References: <20090914.003321.160496287.anemo@mba.ocn.ne.jp> <20090916.004525.74746264.anemo@mba.ocn.ne.jp> In-Reply-To: <20090916.004525.74746264.anemo@mba.ocn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Atsushi Nemoto Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org On Wed, 16 Sep 2009, Atsushi Nemoto wrote: > On Tue, 15 Sep 2009 07:03:42 +0200 (CEST), Julia Lawall wrote: > > > +out_pdev: > > > + platform_device_put(pdev); > > > +out_gpio: > > > + gpio_remove(&iocled->chip); > > > > I just noticed that the prototype of gpio_remove has __must_check > > I don't think there is anything to check here; since the thing is not > > fully initialized here, it is unlikely to be busy. Should there be (void) > > in front of it? > > The void casting does not silence the warning. How about this? > > if (gpiochip_remove(&iocled->chip)) > return; > > In general, memory leak would be less serious than crash or data > corruption ;) OK, I will send an updated patch shortly. julia