From: Jesper Juhl <jj@chaosbits.net> To: linux-kernel@vger.kernel.org Cc: trivial@kernel.org, alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>, Liam Girdwood <lrg@ti.com>, Dimitris Papastamos <dp@opensource.wolfsonmicro.com>, Ian Lartey <ian@opensource.wolfsonmicro.com>, Mark Brown <broonie@opensource.wolfsonmicro.com> Subject: [PATCH 24/26] ASoC: wm8994: Don't test for NULL before release_firmware() Date: Mon, 9 Apr 2012 22:52:19 +0200 (CEST) [thread overview] Message-ID: <alpine.LNX.2.00.1204092243450.14420@swampdragon.chaosbits.net> (raw) In-Reply-To: <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net> release_firmware() does its own NULL ptr testing, it's redundant to also test before calling it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> --- sound/soc/codecs/wm8994.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 7c49642..cf7e5d2 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3972,7 +3972,7 @@ err_irq: return ret; } -static int wm8994_codec_remove(struct snd_soc_codec *codec) +static int wm8994_codec_remove(struct snd_soc_codec *codec) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); struct wm8994 *control = wm8994->wm8994; @@ -4013,14 +4013,10 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) free_irq(wm8994->micdet_irq, wm8994); break; } - if (wm8994->mbc) - release_firmware(wm8994->mbc); - if (wm8994->mbc_vss) - release_firmware(wm8994->mbc_vss); - if (wm8994->enh_eq) - release_firmware(wm8994->enh_eq); + release_firmware(wm8994->mbc); + release_firmware(wm8994->mbc_vss); + release_firmware(wm8994->enh_eq); kfree(wm8994->retune_mobile_texts); - 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: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>, alsa-devel@alsa-project.org, trivial@kernel.org, Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@opensource.wolfsonmicro.com>, Ian Lartey <ian@opensource.wolfsonmicro.com>, Liam Girdwood <lrg@ti.com> Subject: [PATCH 24/26] ASoC: wm8994: Don't test for NULL before release_firmware() Date: Mon, 9 Apr 2012 22:52:19 +0200 (CEST) [thread overview] Message-ID: <alpine.LNX.2.00.1204092243450.14420@swampdragon.chaosbits.net> (raw) In-Reply-To: <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net> release_firmware() does its own NULL ptr testing, it's redundant to also test before calling it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> --- sound/soc/codecs/wm8994.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 7c49642..cf7e5d2 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3972,7 +3972,7 @@ err_irq: return ret; } -static int wm8994_codec_remove(struct snd_soc_codec *codec) +static int wm8994_codec_remove(struct snd_soc_codec *codec) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); struct wm8994 *control = wm8994->wm8994; @@ -4013,14 +4013,10 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) free_irq(wm8994->micdet_irq, wm8994); break; } - if (wm8994->mbc) - release_firmware(wm8994->mbc); - if (wm8994->mbc_vss) - release_firmware(wm8994->mbc_vss); - if (wm8994->enh_eq) - release_firmware(wm8994->enh_eq); + release_firmware(wm8994->mbc); + release_firmware(wm8994->mbc_vss); + release_firmware(wm8994->enh_eq); kfree(wm8994->retune_mobile_texts); - 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 ` [PATCH 23/26] ALSA: riptide: remove redundant NULL test before release_firmware() Jesper Juhl 2012-04-09 20:52 ` Jesper Juhl 2012-04-10 6:45 ` Takashi Iwai 2012-04-10 6:45 ` Takashi Iwai 2012-04-09 20:52 ` Jesper Juhl [this message] 2012-04-09 20:52 ` [PATCH 24/26] ASoC: wm8994: Don't test for NULL " 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.1204092243450.14420@swampdragon.chaosbits.net \ --to=jj@chaosbits.net \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@opensource.wolfsonmicro.com \ --cc=dp@opensource.wolfsonmicro.com \ --cc=ian@opensource.wolfsonmicro.com \ --cc=linux-kernel@vger.kernel.org \ --cc=lrg@ti.com \ --cc=perex@perex.cz \ --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.