diff options
author | Michael Straube <straube.linux@gmail.com> | 2020-09-19 11:50:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-22 10:49:59 +0300 |
commit | 0e934ce2904e05d80f79f7fcb08632df3d994b6b (patch) | |
tree | b35bbb111c6b0068b1df5a6ec7f4035ad6930688 /drivers/staging/rtl8712/rtl871x_security.c | |
parent | dbbc8fdf2ad57629436bcdb421c2d4ad9aa1974f (diff) | |
download | linux-0e934ce2904e05d80f79f7fcb08632df3d994b6b.tar.xz |
staging: rtl8712: clean up comparsions to NULL
Clean up comparsions to NULL Reported by checkpatch.
if (x == NULL) -> if (!x)
if (x != NULL) -> if (x)
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200919085032.32453-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_security.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_security.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c index c05010d85212..5000c87752d3 100644 --- a/drivers/staging/rtl8712/rtl871x_security.c +++ b/drivers/staging/rtl8712/rtl871x_security.c @@ -584,7 +584,7 @@ u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe) else stainfo = r8712_get_stainfo(&padapter->stapriv, &pattrib->ra[0]); - if (stainfo != NULL) { + if (stainfo) { prwskey = &stainfo->x_UncstKey.skey[0]; for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) { @@ -658,7 +658,7 @@ void r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe) if (prxattrib->encrypt == _TKIP_) { stainfo = r8712_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]); - if (stainfo != NULL) { + if (stainfo) { iv = pframe + prxattrib->hdrlen; payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; @@ -1155,7 +1155,7 @@ u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe) else stainfo = r8712_get_stainfo(&padapter->stapriv, &pattrib->ra[0]); - if (stainfo != NULL) { + if (stainfo) { prwskey = &stainfo->x_UncstKey.skey[0]; for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) { @@ -1357,7 +1357,7 @@ void r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe) if (prxattrib->encrypt == _AES_) { stainfo = r8712_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]); - if (stainfo != NULL) { + if (stainfo) { if (is_multicast_ether_addr(prxattrib->ra)) { iv = pframe + prxattrib->hdrlen; idx = iv[3]; |