wireless, orinoco: release_firmware() tests for NULL, remove explicit tests before...
authorJesper Juhl <jj@chaosbits.net>
Mon, 9 Apr 2012 20:51:19 +0000 (22:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Apr 2012 19:06:08 +0000 (15:06 -0400)
It is redundant to test for NULL pointers before calling
release_firmware() since the function does its own NULL test.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/orinoco/fw.c

index 4df8cf64b56ce553d1c1a537741d2f995d414b4c..400a3521764406df48dbde06c5074ee298dd6c69 100644 (file)
@@ -379,11 +379,8 @@ void orinoco_cache_fw(struct orinoco_private *priv, int ap)
 
 void orinoco_uncache_fw(struct orinoco_private *priv)
 {
-       if (priv->cached_pri_fw)
-               release_firmware(priv->cached_pri_fw);
-       if (priv->cached_fw)
-               release_firmware(priv->cached_fw);
-
+       release_firmware(priv->cached_pri_fw);
+       release_firmware(priv->cached_fw);
        priv->cached_pri_fw = NULL;
        priv->cached_fw = NULL;
 }