[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1437046092-16363-2-git-send-email-sudipm.mukherjee@gmail.com>
Date: Thu, 16 Jul 2015 16:58:08 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH 2/6] staging: rtl8188eu: remove redundant NULL check
The check for pstat and pdvobjpriv is not required here as we have
already checked for them before.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index a0b8f66..ba8f9aa 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -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);
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index d0d4335..21744a5 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -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;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists