]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: core: rtw_security: Change form of NULL comparisons
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sat, 5 Mar 2016 21:19:46 +0000 (02:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.

@@
expression e;
@@
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_security.c

index 411d138bce224227fc533ea2165879cbb6a110ba..5a4cfdf1ebd4d9d33336c8094d6490bf135a3ff7 100644 (file)
@@ -634,7 +634,7 @@ int rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
                                             &pattrib->ra[0]);
        }
 
-       if (stainfo == NULL) {
+       if (!stainfo) {
                RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
                         "%s: stainfo == NULL!!!\n", __func__);
                DBG_8723A("%s, psta == NUL\n", __func__);
@@ -731,7 +731,7 @@ int rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
 
        stainfo = rtw_get_stainfo23a(&padapter->stapriv,
                                     &prxattrib->ta[0]);
-       if (stainfo == NULL) {
+       if (!stainfo) {
                RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
                         "%s: stainfo == NULL!!!\n", __func__);
                return _FAIL;