staging/csr: remove firmware pointer check before giving to release_firmware
authorDevendra Naga <develkernel412222@gmail.com>
Sat, 21 Jul 2012 07:22:17 +0000 (13:07 +0545)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Aug 2012 01:56:36 +0000 (18:56 -0700)
we do a check of firmware pointer against the NULL value before we give
it to the release_firmware.

as release_firmware is actually having a check against NULL, its not needed
here.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/csr/firmware.c

index d14e11839618e92cead591160100aca3dc1e6b4d..dc6a04db265a4e6c99ad899477edaf0849d23697 100644 (file)
@@ -402,9 +402,7 @@ int uf_release_firmware_files(unifi_priv_t *priv)
 int uf_release_firmware(unifi_priv_t *priv, struct dlpriv *to_free)
 {
     if (to_free != NULL) {
-        if (to_free->fw_desc != NULL) {
-            release_firmware((const struct firmware *)to_free->fw_desc);
-        }
+        release_firmware((const struct firmware *)to_free->fw_desc);
         to_free->fw_desc = NULL;
         to_free->dl_data = NULL;
         to_free->dl_len = 0;