serial: 68328serial: Use NULL for pointers
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 25 Aug 2015 19:49:46 +0000 (16:49 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 16:44:52 +0000 (17:44 +0100)
Compare pointer-typed values to NULL rather than 0

The semantic patch that makes this change is available
in scripts/coccinelle/null/badzero.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/68328serial.c

index 748c18f8c8cdcbf417899e59b7ba60a35443607b..9ba0c933307898813fab2fba2e413b9d943f9472 100644 (file)
@@ -560,8 +560,8 @@ static void rs_fair_output(void)
        struct m68k_serial *info = &m68k_soft[0];
        char c;
 
-       if (info == 0) return;
-       if (info->xmit_buf == 0) return;
+       if (info == NULL) return;
+       if (info->xmit_buf == NULL) return;
 
        local_irq_save(flags);
        left = info->xmit_cnt;