Staging: rtl8192u: Clean up tests if NULL returned on failure
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 24 Feb 2016 10:17:35 +0000 (15:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit61645cc3124ef012d4e8ca576aa13adf16c17393
tree1d3b8d91429ebded20ae8b9833d49f66ea5eef46
parentf705a2dddd206b31ff7731b3adc69a2433ca6d00
Staging: rtl8192u: Clean up tests if NULL returned on failure

Some functions return Null as their return value on failure. !x is
generally preferred over x==NULL or NULL==x. So make use of !x if
the value returned on failure is NULL.
Done using coccinelle:
@@
expression e;
statement S;
@@
e = \(kmalloc\|devm_kzalloc\|kmalloc_array
     \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...);
- if(e==NULL)
+ if(!e)
  S

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/r8192U_core.c