diff mbox

[04/26] typhoon: get rid of redundant conditional before all to release_firmware()

Message ID alpine.LNX.2.00.1204092208140.13925@swampdragon.chaosbits.net
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Jesper Juhl April 9, 2012, 8:50 p.m. UTC
There's no need to test for a NULL pointer before calling
release_firmware() since the function does that check itself, so
remove the redundant test.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/net/ethernet/3com/typhoon.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

David Dillow April 9, 2012, 9:03 p.m. UTC | #1
On Mon, 2012-04-09 at 22:50 +0200, Jesper Juhl wrote:
> There's no need to test for a NULL pointer before calling
> release_firmware() since the function does that check itself, so
> remove the redundant test.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

FWIW on a trivial patch,

Acked-by: David Dillow <dave@thedillows.org>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index 1234a14..b153666 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -2549,8 +2549,7 @@  typhoon_init(void)
 static void __exit
 typhoon_cleanup(void)
 {
-	if (typhoon_fw)
-		release_firmware(typhoon_fw);
+	release_firmware(typhoon_fw);
 	pci_unregister_driver(&typhoon_driver);
 }