]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: ste_rmi4: simplify NULL tests
authorEva Rachel Retuya <eraretuya@gmail.com>
Sat, 27 Feb 2016 12:39:23 +0000 (20:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for
consistency. Coccinelle semantic patch used:

@@
identifier func;
expression x;
statement Z;
@@

x = func(...);

if (
(
+ !
x
- == NULL
|
+ !
- NULL ==
x
)
   ) Z

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c

index 850a808f7d90bd8b35d1ec456ee79763b91b1278..774958a8ce02b50c471b8368f0667331675967dc 100644 (file)
@@ -912,7 +912,7 @@ static int synaptics_rmi4_probe
                return -ENOMEM;
 
        rmi4_data->input_dev = input_allocate_device();
-       if (rmi4_data->input_dev == NULL) {
+       if (!rmi4_data->input_dev) {
                retval = -ENOMEM;
                goto err_input;
        }