Staging: speakup: serialio.c: Remove explicit NULL comparison
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 11 Sep 2015 06:02:27 +0000 (11:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:25:00 +0000 (18:25 -0700)
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/serialio.c

index 66ac999a032320791db2e307fabc98221920ca90..3b5835b2812849f0c32055f065ef0be6a0c4d0d0 100644 (file)
@@ -101,7 +101,7 @@ static void start_serial_interrupt(int irq)
 {
        int rv;
 
-       if (synth->read_buff_add == NULL)
+       if (!synth->read_buff_add)
                return;
 
        rv = request_irq(irq, synth_readbuf_handler, IRQF_SHARED,
@@ -127,7 +127,7 @@ void spk_stop_serial_interrupt(void)
        if (speakup_info.port_tts == 0)
                return;
 
-       if (synth->read_buff_add == NULL)
+       if (!synth->read_buff_add)
                return;
 
        /* Turn off interrupts */