USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer
authorYing Xue <ying.xue@windriver.com>
Mon, 6 Aug 2012 09:46:37 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Aug 2012 19:01:32 +0000 (12:01 -0700)
Pointers should not be compared to plain integers.
Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c

index bc912e5a3bebddf3073fe17e015b6195be3708be..70688cba95e38565ddda5c6a9c0742e8939da281 100644 (file)
@@ -2106,7 +2106,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
 
        cflag = termios->c_cflag;
 
-       if (old_termios == 0)
+       if (!old_termios)
                goto no_skip;
 
        if (old_termios->c_cflag == termios->c_cflag