From: Jesper Juhl <jj@chaosbits.net> To: linux-kernel@vger.kernel.org Cc: trivial@kernel.org, alsa-devel@alsa-project.org, Clemens Ladisch <clemens@ladisch.de>, Rusty Russell <rusty@rustcorp.com.au>, Paul Gortmaker <paul.gortmaker@windriver.com>, Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz> Subject: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Date: Mon, 9 Apr 2012 22:52:10 +0200 (CEST) [thread overview] Message-ID: <alpine.LNX.2.00.1204092241550.14420@swampdragon.chaosbits.net> (raw) In-Reply-To: <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net> release_firmware() deals gracefully with NULL pointers, no need to check first. Signed-off-by: Jesper Juhl <jj@chaosbits.net> --- 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 <jj@chaosbits.net> http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.
WARNING: multiple messages have this Message-ID (diff)
From: Jesper Juhl <jj@chaosbits.net> To: linux-kernel@vger.kernel.org Cc: alsa-devel@alsa-project.org, trivial@kernel.org, Takashi Iwai <tiwai@suse.de>, Rusty Russell <rusty@rustcorp.com.au>, Clemens Ladisch <clemens@ladisch.de>, Paul Gortmaker <paul.gortmaker@windriver.com> Subject: [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Date: Mon, 9 Apr 2012 22:52:10 +0200 (CEST) [thread overview] Message-ID: <alpine.LNX.2.00.1204092241550.14420@swampdragon.chaosbits.net> (raw) In-Reply-To: <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net> release_firmware() deals gracefully with NULL pointers, no need to check first. Signed-off-by: Jesper Juhl <jj@chaosbits.net> --- 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 <jj@chaosbits.net> http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.
next prev parent reply other threads:[~2012-04-09 20:52 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-09 20:49 [PATCH 00/26] Remove redundant tests for NULL before calling release_firmware() Jesper Juhl 2012-04-09 20:49 ` [PATCH 01/26] Bluetooth: btmrvl_sdio: remove pointless conditional before release_firmware() Jesper Juhl 2012-04-13 21:36 ` Gustavo Padovan 2012-04-09 20:49 ` [PATCH 02/26] radeon_cp: Remove unneeded tests for NULL before calling release_firmware() Jesper Juhl 2012-04-09 20:50 ` [PATCH 03/26] [media] s2255drv: Remove redundant NULL test before release_firmware() Jesper Juhl 2012-04-09 20:50 ` [PATCH 04/26] typhoon: get rid of redundant conditional before all to release_firmware() Jesper Juhl 2012-04-09 21:03 ` David Dillow 2012-04-09 20:50 ` [PATCH 05/26] tg3: remove redundant NULL test before release_firmware() call Jesper Juhl 2012-04-09 20:50 ` [PATCH 06/26] bna: remove redundant NULL test before release_firmware() Jesper Juhl 2012-04-09 21:14 ` Rasesh Mody 2012-04-09 20:50 ` [PATCH 07/26] qlogic, netxen: get rid of a redundant test for NULL before call to release_firmware() Jesper Juhl 2012-04-09 20:50 ` [PATCH 08/26] qlogic, qlcnic: get rid of redundant test for NULL before a " Jesper Juhl 2012-04-09 20:50 ` [PATCH 09/26] tehuti: delete redundant NULL check before release_firmware() Jesper Juhl 2012-04-11 13:31 ` Andy Gospodarek 2012-04-09 20:50 ` [PATCH 10/26] wireless, at76c50x:: Don't needlessly test for NULL before calling release_firmware() Jesper Juhl 2012-04-09 20:50 ` [PATCH 11/26] wireless, atmel: remove pointless test for NULL before release_firmware() call Jesper Juhl 2012-04-09 20:50 ` Jesper Juhl 2012-04-09 20:51 ` [PATCH 12/26] ipw2200: remove a redundant NULL check before calling release_firmware() Jesper Juhl 2012-04-09 20:51 ` [PATCH 13/26] wireless, libertas: remove redundant NULL tests " Jesper Juhl 2012-04-09 20:51 ` [PATCH 14/26] wireless, mwifiex: drop redundant NULL test before call to release_firmware() Jesper Juhl 2012-04-09 20:59 ` Bing Zhao 2012-04-09 20:51 ` [PATCH 15/26] wireless, orinoco: release_firmware() tests for NULL, remove explicit tests before calls Jesper Juhl 2012-04-09 20:51 ` [PATCH 16/26] remoteproc: remove redundant NULL check before release_firmware() Jesper Juhl 2012-04-09 20:51 ` [PATCH 17/26] [SCSI] aic94xx: Get rid of redundant NULL check before release_firmware() call Jesper Juhl 2012-04-09 20:51 ` [PATCH 18/26] [SCSI] qla1280: Remove " Jesper Juhl 2012-04-09 20:51 ` [PATCH 19/26] [SCSI] qla2xxx: " Jesper Juhl 2012-04-10 12:22 ` Chad Dupuis 2012-04-09 20:51 ` [PATCH 20/26] [media] staging: as102: Remove redundant NULL check before release_firmware() and pointless comments Jesper Juhl 2012-04-09 20:51 ` [PATCH 21/26] staging: vt6656: Don't needlessly test for NULL before release_firmware() Jesper Juhl 2012-04-09 20:52 ` [PATCH 22/26] usb/storage/ene_ub6250: Remove redundant NULL check before release_firmware() and pointless assignment Jesper Juhl 2012-04-09 20:52 ` Jesper Juhl [this message] 2012-04-09 20:52 ` [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Jesper Juhl 2012-04-10 6:45 ` Takashi Iwai 2012-04-10 6:45 ` Takashi Iwai 2012-04-09 20:52 ` [PATCH 24/26] ASoC: wm8994: Don't test for NULL " Jesper Juhl 2012-04-09 20:52 ` Jesper Juhl 2012-04-10 10:08 ` Mark Brown 2012-04-10 10:08 ` Mark Brown 2012-04-09 20:52 ` [PATCH 25/26] usb/atm/ueagle-atm: Don't test for NULL ptr before calling release_firmware() Jesper Juhl 2012-04-09 20:52 ` [PATCH 26/26] ipw2100: remove a redundant NULL check " Jesper Juhl
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=alpine.LNX.2.00.1204092241550.14420@swampdragon.chaosbits.net \ --to=jj@chaosbits.net \ --cc=alsa-devel@alsa-project.org \ --cc=clemens@ladisch.de \ --cc=linux-kernel@vger.kernel.org \ --cc=paul.gortmaker@windriver.com \ --cc=perex@perex.cz \ --cc=rusty@rustcorp.com.au \ --cc=tiwai@suse.de \ --cc=trivial@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.