diff options
author | Michael Straube <straube.linux@gmail.com> | 2021-08-29 18:45:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-13 09:49:43 +0300 |
commit | cd1f1450092216b3e39516f8db58869b6fc20575 (patch) | |
tree | 3ed0bc1451dcc497263d4335f81028b9fe597223 /drivers/staging/rtl8723bs/core/rtw_security.c | |
parent | 147dbb198737206eca09cb14375cb85b9340ff92 (diff) | |
download | linux-cd1f1450092216b3e39516f8db58869b6fc20575.tar.xz |
staging: rtl8723bs: clean up comparsions to NULL
Clean up comparsions to NULL reported by checkpatch.
x == NULL -> !x
x != NULL -> x
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210829154533.11054-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_security.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_security.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index b050bf62e3b9..ac731415f733 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -51,7 +51,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct arc4_ctx *ctx = &psecuritypriv->xmit_arc4_ctx; - if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL) + if (!((struct xmit_frame *)pxmitframe)->buf_addr) return; hw_hdr_offset = TXDESC_OFFSET; @@ -476,7 +476,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) struct arc4_ctx *ctx = &psecuritypriv->xmit_arc4_ctx; u32 res = _SUCCESS; - if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL) + if (!((struct xmit_frame *)pxmitframe)->buf_addr) return _FAIL; hw_hdr_offset = TXDESC_OFFSET; @@ -1043,7 +1043,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) u32 res = _SUCCESS; - if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL) + if (!((struct xmit_frame *)pxmitframe)->buf_addr) return _FAIL; hw_hdr_offset = TXDESC_OFFSET; |