aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
diff options
context:
space:
mode:
authorElise Lennion <elise.lennion@gmail.com>2016-10-28 22:29:21 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-30 11:09:03 -0400
commit15ed5398c94c8e29ee11022926351cb77cf70e7f (patch)
tree40179e06ab132a4eed8c8854d5fe6b55f2e27f72 /drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
parentstaging: dgnc: Fix multi-line comment alignment (diff)
downloadlinux-dev-15ed5398c94c8e29ee11022926351cb77cf70e7f.tar.xz
linux-dev-15ed5398c94c8e29ee11022926351cb77cf70e7f.zip
staging: rtl8192e: 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 '')
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
index f9003a28cae2..757ffd4f2f89 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
@@ -49,7 +49,7 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
else
skb = dev_alloc_skb(frag_length + 4);
- if (skb == NULL) {
+ if (!skb) {
rt_status = false;
goto Failed;
}