staging: speakup: remove NULL comparison
authorAastha Gupta <aastha.gupta4104@gmail.com>
Sun, 17 Sep 2017 20:00:35 +0000 (01:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 09:50:40 +0000 (11:50 +0200)
This was done using cocccinelle script:
@@
identifier arg;
@@

-arg==NULL
+!arg

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/main.c

index 938a0ae..e215d05 100644 (file)
@@ -2096,7 +2096,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
        u_char shift_info, offset;
        int ret = 0;
 
-       if (synth == NULL)
+       if (!synth)
                return 0;
 
        spin_lock_irqsave(&speakup_info.spinlock, flags);