Staging: sm750fb: Remove zero testing pointer typed value
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 2 Apr 2015 17:31:04 +0000 (23:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2015 09:10:27 +0000 (11:10 +0200)
commit59f084070c96f777f977ebd58dc934b9d2a1d95b
tree43d82c65fe91cd47c6b1361681b9052274a5b208
parente261e69e2d16b69eb712123b9e73bac50282b6a7
Staging: sm750fb: Remove zero testing pointer typed value

Removes variable comparison with 0.
Done using following coccinelle script.

@ disable is_zero,isnt_zero @
expression *E;
expression E1,f;
@@

E = f(...)
<...
(
- E == 0
+ !E
|
- E != 0
+ E
|
- 0 == E
+ !E
|
- 0 != E
+ E
)
...>
?E = E1

@ disable is_zero,isnt_zero @
expression *E;
@@

(
  E ==
- 0
+ NULL
|
  E !=
- 0
+ NULL
|
- 0
+ NULL
  == E
|
- 0
+ NULL
  != E
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/ddk750_chip.c