]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
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>
Thu, 13 Jun 2013 16:45:02 +0000 (09:45 -0700)
commit a816e3113b63753c330ca4751ea1d208e93e3015 upstream.

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>
Cc: Lotfi Manseur <lotfi.manseur@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c

index c6f8e62b4a426c2553cdd04f7146040c6295c204..f8a9cd78f26823366e6ab3c14ac01cc12d63d579 100644 (file)
@@ -2173,7 +2173,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