diff options
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | 2019-06-20 17:22:57 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-20 14:47:28 +0200 |
commit | 97a738d30cb17a327874d8f594d59c69d33c5c37 (patch) | |
tree | fc781d41bd9948d30e1d9873d944dd24726fd9d2 /drivers/staging | |
parent | fbcfbf653636a4afe1ac5d477b755c327c2d2a10 (diff) | |
download | linux-97a738d30cb17a327874d8f594d59c69d33c5c37.tar.bz2 |
staging: rtl8712: rtl871x_cmd.c: Remove unnecessary null check
Remove the check for whether the value of variable psecnetwork is NULL
as psecnetwork is a field of a field of a non-NULL pointer, and
therefore cannot be NULL itself.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 94ff875d9025..01146d9c3a9b 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -468,10 +468,6 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) } } psecnetwork = &psecuritypriv->sec_bss; - if (!psecnetwork) { - kfree(pcmd); - return _FAIL; - } memcpy(psecnetwork, &pnetwork->network, sizeof(*psecnetwork)); psecuritypriv->authenticator_ie[0] = (unsigned char) psecnetwork->IELength; |