staging: rtl8188eu: remove redundant NULL check
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 16 Jul 2015 11:28:08 +0000 (16:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2015 17:17:08 +0000 (10:17 -0700)
The check for pstat and pdvobjpriv is not required here as we have
already checked for them before.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index a0b8f665fa2f5546f23b584abb9248c1ba35d652..ba8f9aa5d25956281e58c447496e4613b3cb1c60 100644 (file)
@@ -3367,7 +3367,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
        spin_unlock_bh(&pstapriv->asoc_list_lock);
 
        /*  now the station is qualified to join our BSS... */
-       if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) {
+       if ((pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) {
                /* 1 bss_cap_update & sta_info_update */
                bss_cap_update_on_sta_join(padapter, pstat);
                sta_info_update(padapter, pstat);
index d0d4335b444c3eea93883c944cd361ca9a12a3f9..21744a548bb8a45afadccd5f959c7619ab1fffaa 100644 (file)
@@ -123,7 +123,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
        status = _SUCCESS;
 
 free_dvobj:
-       if (status != _SUCCESS && pdvobjpriv) {
+       if (status != _SUCCESS) {
                usb_set_intfdata(usb_intf, NULL);
                kfree(pdvobjpriv);
                pdvobjpriv = NULL;