staging: vc04_services: Remove explicit NULL comparison
authorGargi Sharma <gs051095@gmail.com>
Thu, 23 Feb 2017 20:28:18 +0000 (01:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:02 +0000 (09:17 +0100)
commit47db0f6c9a2210dc5a7c45551d63d7d69b5600a6
tree47389bdc6bac6217f480a05cff584453c9d0bdb4
parent1ee64912417a1021924c99f4c808cb1fffec55d1
staging: vc04_services: Remove explicit NULL comparison

Replace explicit NULL comparison with ! operator to
simplify code.

Found with Coccinelle script:
@@
expression ptr;
position p;
statement s0, s1;
@@

ptr@p =
\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\|
alloc_netdev\|dev_alloc_skb\)(...)
... when != ptr

if (
(
+ !
ptr
- == NULL
)
) s0 else s1

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c