All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jj@chaosbits.net>
To: linux-kernel@vger.kernel.org
Cc: trivial@kernel.org, devel@driverdev.osuosl.org,
	Jiri Pirko <jpirko@redhat.com>, Julia Lawall <julia@diku.dk>,
	"David S. Miller" <davem@davemloft.net>,
	Marcos Paulo de Souza <marcos.mage@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Forest Bond <forest@alittletooquiet.net>
Subject: [PATCH 21/26] staging: vt6656: Don't needlessly test for NULL before release_firmware()
Date: Mon, 9 Apr 2012 22:51:58 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1204092239320.14420@swampdragon.chaosbits.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net>

Checking for a NULL pointer before calling release_firmware() is
redundant since the function does that check itself.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/vt6656/main_usb.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 763e028..ee5261a 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1257,9 +1257,7 @@ static void __devexit vt6656_disconnect(struct usb_interface *intf)
 	}
 
 	device_release_WPADEV(device);
-
-	if (device->firmware)
-		release_firmware(device->firmware);
+	release_firmware(device->firmware);
 
 	usb_set_intfdata(intf, NULL);
 	usb_put_dev(interface_to_usbdev(intf));
-- 
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.


  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 ` Jesper Juhl [this message]
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 ` [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.1204092239320.14420@swampdragon.chaosbits.net \
    --to=jj@chaosbits.net \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jpirko@redhat.com \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcos.mage@gmail.com \
    --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: link
Be 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.