From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758196Ab2DIUwP (ORCPT ); Mon, 9 Apr 2012 16:52:15 -0400 Received: from swampdragon.chaosbits.net ([90.184.90.115]:21322 "EHLO swampdragon.chaosbits.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753781Ab2DIUwL (ORCPT ); Mon, 9 Apr 2012 16:52:11 -0400 Date: Mon, 9 Apr 2012 22:52:10 +0200 (CEST) From: Jesper Juhl To: linux-kernel@vger.kernel.org cc: trivial@kernel.org, alsa-devel@alsa-project.org, Clemens Ladisch , Rusty Russell , Paul Gortmaker , Takashi Iwai , Jaroslav Kysela Subject: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) 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 release_firmware() deals gracefully with NULL pointers, no need to check first. Signed-off-by: Jesper Juhl --- 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: Jesper Juhl Subject: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Date: Mon, 9 Apr 2012 22:52:10 +0200 (CEST) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from swampdragon.chaosbits.net (swampdragon.chaosbits.net [90.184.90.115]) by alsa0.perex.cz (Postfix) with ESMTP id 3DCC624560 for ; Mon, 9 Apr 2012 22:52:11 +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: linux-kernel@vger.kernel.org Cc: alsa-devel@alsa-project.org, trivial@kernel.org, Takashi Iwai , Rusty Russell , Clemens Ladisch , Paul Gortmaker List-Id: alsa-devel@alsa-project.org release_firmware() deals gracefully with NULL pointers, no need to check first. Signed-off-by: Jesper Juhl --- 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.