summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorElise Lennion2016-10-29 02:29:40 +0200
committerGreg Kroah-Hartman2016-10-30 16:09:03 +0100
commit6e8cb1cf26ccf99582826d20032433b1c8d57774 (patch)
treeb8ecd7e1e753abf661e35a57f8035f3aff483fc2 /drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
parentstaging: rtl8192e: Standardize test for NULL. (diff)
downloadkernel-qcow2-linux-6e8cb1cf26ccf99582826d20032433b1c8d57774.tar.gz
kernel-qcow2-linux-6e8cb1cf26ccf99582826d20032433b1c8d57774.tar.xz
kernel-qcow2-linux-6e8cb1cf26ccf99582826d20032433b1c8d57774.zip
staging: rtl8192u: Standardize test for NULL.
The test for NULL of the return variable of functions was changed from (ret == NULL) to !ret to match the standard. Coccinelle was used with semantic patch: @@ expression e; identifier id, f; statement S; @@ f(...) { <+... id = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap \|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\) (...) ... when any when != id = e + if (!id) - if (\(NULL == id\|id == NULL\)) S ...+> } Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 2e4d2d7bc2e7..82f654305414 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -129,7 +129,7 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
8 /* WEP */ +
ETH_ALEN /* WDS */ +
(IEEE80211_QOS_HAS_SEQ(fc)?2:0) /* QOS Control */);
- if (skb == NULL)
+ if (!skb)
return NULL;
entry = &ieee->frag_cache[tid][ieee->frag_next_idx[tid]];