This patch replace explicit NULL comparison with ! or unmark operator to
simplify code.
Reported by checkpatch.pl for comparison to NULL could be
written "!XXX" or "XXX".
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct ieee80211_crypt_data *tmp;
unsigned long flags;
- if (*crypt == NULL)
+ if (!(*crypt))
return;
tmp = *crypt;
unsigned long flags;
struct ieee80211_crypto_alg *alg;
- if (hcrypt == NULL)
+ if (!hcrypt)
return -1;
alg = kzalloc(sizeof(*alg), GFP_KERNEL);
- if (alg == NULL)
+ if (!alg)
return -ENOMEM;
alg->ops = ops;
struct list_head *ptr;
struct ieee80211_crypto_alg *del_alg = NULL;
- if (hcrypt == NULL)
+ if (!hcrypt)
return -1;
spin_lock_irqsave(&hcrypt->lock, flags);
struct list_head *ptr;
struct ieee80211_crypto_alg *found_alg = NULL;
- if (hcrypt == NULL)
+ if (!hcrypt)
return NULL;
spin_lock_irqsave(&hcrypt->lock, flags);
{
struct list_head *ptr, *n;
- if (hcrypt == NULL)
+ if (!hcrypt)
return;
for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs;