linux/drivers
Somya Anand 4c42d97981 Staging: nvec: use !x instead of x == NULL
Functions like devm_kzalloc, kmalloc_array, devm_ioremap,
usb_alloc_urb, alloc_netdev return NULL as a return value on failure.
Generally, When NULL represents failure, !x is commonly used.

This patch cleans up the tests on the results of these functions, thereby
using !x instead of x == NULL or NULL == x. This is done via following
coccinelle script:
@prob_7@
identifier x;
statement S;
@@

(
 x = devm_kzalloc(...);
|
 x = usb_alloc_urb(...);
|
 x = kmalloc_array(...);
|
 x = devm_ioremap(...);
|
 x = alloc_netdev(...);
)
 ...
- if(NULL == x)
+ if(!x)
        S
Further we have used isomorphism characteristics of coccinelle to
indicate x == NULL and NULL == x are equivalent. This is done via
following iso script.

Expression
@ is_null @ expression X; @@
X == NULL <=> NULL == X

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:28:47 +01:00
..
accessibility
acpi Merge branch 'acpi-video' 2015-03-06 01:29:16 +01:00
amba
android android: binder: fix binder mmap failures 2015-03-01 18:43:51 -08:00
ata
atm
auxdisplay
base Merge branches 'pm-domains' and 'pm-cpufreq' 2015-03-06 01:29:31 +01:00
bcma
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2015-02-28 10:21:57 -08:00
bluetooth Bluetooth: btusb: Fix issue with CSR based Intel Wireless controllers 2015-02-23 09:30:35 +02:00
bus
cdrom
char
clk clk: at91: implement suspend/resume for the PMC irqchip 2015-03-04 22:11:17 +01:00
clocksource clocksource: pxa: Fix section mismatch 2015-02-25 10:28:55 +01:00
connector
coresight
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2015-03-06 13:43:33 -08:00
cpuidle cpuidle / sleep: Use broadcast timer for states that stop local timer 2015-03-05 23:13:19 +01:00
crypto
dca
devfreq
dio
dma Merge 4.0-rc3 into staging-next 2015-03-09 08:13:01 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware * Fix regression in DMI sysfs code for handling "End of Table" entry 2015-03-02 14:18:57 +01:00
fmc
gpio gpio: tps65912: fix wrong container_of arguments 2015-02-23 15:40:32 +01:00
gpu Merge tag 'drm-intel-fixes-2015-03-05' of git://anongit.freedesktop.org/drm-intel into drm-fixes 2015-03-07 07:40:17 +10:00
hid HID: microsoft: Add ID for NE7K wireless keyboard 2015-02-23 15:28:40 +01:00
hsi
hv
hwmon hwmon: (ads7828) Check return value of devm_regmap_init_i2c 2015-02-22 20:10:30 -08:00
hwspinlock
i2c i2c: designware-baytrail: baytrail_i2c_acquire() might sleep 2015-03-07 01:08:26 +01:00
ide
idle
iio Second round of IIO fixes for the 4.0 cycle (or round one part two really!) 2015-02-28 07:19:27 -08:00
infiniband Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-02-22 17:42:14 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-02-21 12:59:04 -08:00
iommu
ipack
irqchip Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-02-21 19:41:38 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 15:30:07 -08:00
leds
lguest
macintosh
mailbox
mcb
md md: mark some attributes as pre-alloc 2015-02-25 11:38:46 +11:00
media
memory
memstick
message
mfd
misc mei: make device disabled on stop unconditionally 2015-03-01 19:34:50 -08:00
mmc The clock framework changes for 3.20 contain the usual driver additions, 2015-02-21 12:30:30 -08:00
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 15:30:07 -08:00
nfc
ntb
nubus
of
oprofile
parisc
parport
pci PCI: versatile: Update for list_for_each_entry() API change 2015-02-28 00:47:00 +01:00
pcmcia
phy
pinctrl
platform Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-21 11:12:07 -08:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc Merge branch 'irq-pm' 2015-03-06 01:29:05 +01:00
s390
sbus
scsi SCSI misc on 20150221 2015-02-21 19:16:42 -08:00
sfi
sh drivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd 2015-02-24 07:26:12 +09:00
sn
soc
spi
spmi
ssb
staging Staging: nvec: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-02-21 13:21:19 -08:00
tc
thermal thermal: Make sysfs attributes of cooling devices default attributes 2015-03-05 01:47:57 -04:00
thunderbolt
tty TTY/Serial fixes for 4.0-rc3 2015-03-08 12:25:40 -07:00
uio
usb USB fixes for 4.0-rc3 2015-03-08 12:47:18 -07:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 15:30:07 -08:00
video
virt
virtio
vlynq
vme vme: tsi148: Master windows support USERx and CR/CSR accesses, not slaves 2015-03-06 17:03:22 -08:00
w1
watchdog watchdog: at91sam9: request the irq with IRQF_NO_SUSPEND 2015-03-06 00:46:31 +01:00
xen xen-scsiback: mark pvscsi frontend request consumed only after last read 2015-02-23 16:30:25 +00:00
zorro
Kconfig
Makefile