Staging: rtl8723au: rtw_mlme_ext: Remove unnecessary test expression
authorShivani Bhardwaj <shivanib134@gmail.com>
Wed, 14 Oct 2015 10:19:06 +0000 (15:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 05:09:59 +0000 (22:09 -0700)
Logical and-ing of a struct and its member should be replaced by the
member only as the struct has already been NULL tested before.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c

index fca22ba896b32d091f2ea053939160a64861299a..d28f29a938108bcb5dd8f20442a9d8f8ac2adca8 100644 (file)
@@ -1715,7 +1715,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        spin_unlock_bh(&pstapriv->asoc_list_lock);
 
        /*  now the station is qualified to join our BSS... */
-       if (pstat && pstat->state & WIFI_FW_ASSOC_SUCCESS &&
+       if (pstat->state & WIFI_FW_ASSOC_SUCCESS &&
            status == WLAN_STATUS_SUCCESS) {
                /* 1 bss_cap_update & sta_info_update23a */
                bss_cap_update_on_sta_join23a(padapter, pstat);