diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-26 17:18:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-20 20:45:59 (GMT) |
commit | 400838659314cc67032f35962eee5a8639981b61 (patch) | |
tree | 1b03ff869d305c5b7aca8ef2c9d5a6b1ff93c5bc /drivers/staging/rtl8712/rtl871x_cmd.c | |
parent | cc614b6970ed9957d51255682c2784c2310623af (diff) | |
download | linux-fsl-qoriq-400838659314cc67032f35962eee5a8639981b61.tar.xz |
Staging: rtl8712: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_cmd.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index fbb2e4e..6b9daa6 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -431,8 +431,7 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) } psecnetwork = (struct ndis_wlan_bssid_ex *)&psecuritypriv->sec_bss; if (psecnetwork == NULL) { - if (pcmd != NULL) - kfree((unsigned char *)pcmd); + kfree(pcmd); return _FAIL; } memset(psecnetwork, 0, t_len); |