diff options
author | Eva Rachel Retuya <eraretuya@gmail.com> | 2016-02-27 20:39:23 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-11 22:09:09 -0800 |
commit | 1f4e2706525d46eeb678759f8a626619e5461143 (patch) | |
tree | 7399b7bf452f53172ce2ea16a6414b7dbfe6fe7f | |
parent | eea04b072d93ef0c2b6154e5f9c7a422767944be (diff) | |
download | linux-1f4e2706525d46eeb678759f8a626619e5461143.tar.bz2 |
staging: ste_rmi4: simplify NULL tests
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>
-rw-r--r-- | drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 850a808f7d90..774958a8ce02 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -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; } |