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>
This commit is contained in:
Nishka Dasgupta 2019-06-20 17:22:57 +05:30 committed by Greg Kroah-Hartman
parent fbcfbf6536
commit 97a738d30c
1 changed files with 0 additions and 4 deletions

View File

@ -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;