* [PATCH 2/6] staging: rtl8192e: Change form of NULL comparisons
@ 2017-02-19 21:51 simran singhal
0 siblings, 0 replies; only message in thread
From: simran singhal @ 2017-02-19 21:51 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, outreachy-kernel
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@ expression e;
@@
- e == NULL
+ !e
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 2 +-
drivers/staging/rtl8192e/rtllib_crypt_wep.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 48bbd9e..d0c2f3c 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -289,7 +289,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
{
u8 count;
- if (pTsCommonInfo == NULL)
+ if (!pTsCommonInfo)
return;
memcpy(pTsCommonInfo->Addr, Addr, 6);
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
index bc45cf0..ed2e06f 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
@@ -63,7 +63,7 @@ static void *rtllib_ccmp_init(int key_idx)
struct rtllib_ccmp_data *priv;
priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
- if (priv == NULL)
+ if (!priv)
goto fail;
priv->key_idx = key_idx;
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
index b3343a5..f5a1bc5 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
@@ -37,7 +37,7 @@ static void *prism2_wep_init(int keyidx)
struct prism2_wep_data *priv;
priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
- if (priv == NULL)
+ if (!priv)
goto fail;
priv->key_idx = keyidx;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-19 21:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-19 21:51 [PATCH 2/6] staging: rtl8192e: Change form of NULL comparisons simran singhal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox