staging: rtl8723bs: clean up identical code on an if statement
authorColin Ian King <colin.king@canonical.com>
Thu, 13 Apr 2017 15:46:36 +0000 (16:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 11:54:25 +0000 (13:54 +0200)
The two different paths for an if statement are identical and hence
we can just replace it with the single statement.

Detected by CoverityScan, CID#1428443 ("Identical code for
different branches")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c

index 53755e5b97a6eac253ce05d2964616aceccd4944..9e355734f0c01b6490198591088b0dc40d82d979 100644 (file)
@@ -1093,11 +1093,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
                rtw_init_bcmc_stainfo(adapter);
        }
 
-       if (lock_scanned_queue) {
-               find_network(adapter);
-       } else {
-               find_network(adapter);
-       }
+       find_network(adapter);
 
        if (lock_scanned_queue)
                adapter->securitypriv.key_mask = 0;