From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754948Ab2DJGpz (ORCPT ); Tue, 10 Apr 2012 02:45:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50464 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322Ab2DJGpy (ORCPT ); Tue, 10 Apr 2012 02:45:54 -0400 Date: Tue, 10 Apr 2012 08:45:51 +0200 Message-ID: From: Takashi Iwai To: Jesper Juhl Cc: linux-kernel@vger.kernel.org, trivial@kernel.org, alsa-devel@alsa-project.org, Clemens Ladisch , Rusty Russell , Paul Gortmaker , Jaroslav Kysela Subject: Re: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() In-Reply-To: References: User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Mon, 9 Apr 2012 22:52:10 +0200 (CEST), Jesper Juhl wrote: > > release_firmware() deals gracefully with NULL pointers, no need to check first. > > Signed-off-by: Jesper Juhl Applied now. Thanks. Takashi > --- > sound/pci/riptide/riptide.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c > index 0481d94..cbeb3f7 100644 > --- a/sound/pci/riptide/riptide.c > +++ b/sound/pci/riptide/riptide.c > @@ -1837,8 +1837,7 @@ static int snd_riptide_free(struct snd_riptide *chip) > } > if (chip->irq >= 0) > free_irq(chip->irq, chip); > - if (chip->fw_entry) > - release_firmware(chip->fw_entry); > + release_firmware(chip->fw_entry); > release_and_free_resource(chip->res_port); > kfree(chip); > return 0; > -- > 1.7.10 > > > -- > Jesper Juhl http://www.chaosbits.net/ > Don't top-post http://www.catb.org/jargon/html/T/top-post.html > Plain text mails only, please. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Date: Tue, 10 Apr 2012 08:45:51 +0200 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 969742449F for ; Tue, 10 Apr 2012 08:45:53 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Jesper Juhl Cc: alsa-devel@alsa-project.org, trivial@kernel.org, Rusty Russell , Clemens Ladisch , linux-kernel@vger.kernel.org, Paul Gortmaker List-Id: alsa-devel@alsa-project.org At Mon, 9 Apr 2012 22:52:10 +0200 (CEST), Jesper Juhl wrote: > > release_firmware() deals gracefully with NULL pointers, no need to check first. > > Signed-off-by: Jesper Juhl Applied now. Thanks. Takashi > --- > sound/pci/riptide/riptide.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c > index 0481d94..cbeb3f7 100644 > --- a/sound/pci/riptide/riptide.c > +++ b/sound/pci/riptide/riptide.c > @@ -1837,8 +1837,7 @@ static int snd_riptide_free(struct snd_riptide *chip) > } > if (chip->irq >= 0) > free_irq(chip->irq, chip); > - if (chip->fw_entry) > - release_firmware(chip->fw_entry); > + release_firmware(chip->fw_entry); > release_and_free_resource(chip->res_port); > kfree(chip); > return 0; > -- > 1.7.10 > > > -- > Jesper Juhl http://www.chaosbits.net/ > Don't top-post http://www.catb.org/jargon/html/T/top-post.html > Plain text mails only, please. >