linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/26] Bluetooth: btmrvl_sdio: remove pointless conditional before release_firmware()
       [not found] <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net>
@ 2012-04-09 20:49 ` Jesper Juhl
  2012-04-13 21:36   ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2012-04-09 20:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: trivial, linux-bluetooth, Johan Hedberg, Gustavo Padovan,
	Marcel Holtmann

release_firmware() deals gracefullt with NULL pointers so there's no
reason to test for one prior to calling the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/bluetooth/btmrvl_sdio.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 27b74b0..ed62c7f 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -339,9 +339,7 @@ static int btmrvl_sdio_download_helper(struct btmrvl_sdio_card *card)
 
 done:
 	kfree(tmphlprbuf);
-	if (fw_helper)
-		release_firmware(fw_helper);
-
+	release_firmware(fw_helper);
 	return ret;
 }
 
@@ -484,10 +482,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
 
 done:
 	kfree(tmpfwbuf);
-
-	if (fw_firmware)
-		release_firmware(fw_firmware);
-
+	release_firmware(fw_firmware);
 	return ret;
 }
 
-- 
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.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 01/26] Bluetooth: btmrvl_sdio: remove pointless conditional before release_firmware()
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-04-13 21:36 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, trivial, linux-bluetooth, Johan Hedberg,
	Marcel Holtmann

Hi Jesper,

* Jesper Juhl <jj@chaosbits.net> [2012-04-09 22:49:49 +0200]:

> release_firmware() deals gracefullt with NULL pointers so there's no
> reason to test for one prior to calling the function.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
>  drivers/bluetooth/btmrvl_sdio.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)

Patch has been applied, thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-13 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.LNX.2.00.1204092157340.13925@swampdragon.chaosbits.net>
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).