+ drivers-usb-serial-io_tic-remove-unneeded-null-tty-check.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     drivers/usb/serial/io_ti.c: remove unneeded null tty check
has been added to the -mm tree.  Its filename is
     drivers-usb-serial-io_tic-remove-unneeded-null-tty-check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/usb/serial/io_ti.c: remove unneeded null tty check
From: Ray Lee <ray-lk@xxxxxxxxxxxxx>

The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of
port->tty (it's blindly dereferenced later without the check).

Alan Cox confirmed the check can go.

Signed-off-by: Ray Lee <ray-lk@xxxxxxxxxxxxx>
Cc: Greg KH <gregkh@xxxxxxx>
Cc: Adrian Bunk <bunk@xxxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/usb/serial/io_ti.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/usb/serial/io_ti.c~drivers-usb-serial-io_tic-remove-unneeded-null-tty-check drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c~drivers-usb-serial-io_tic-remove-unneeded-null-tty-check
+++ a/drivers/usb/serial/io_ti.c
@@ -1942,8 +1942,7 @@ static int edge_open (struct usb_serial_
 	if (edge_port == NULL)
 		return -ENODEV;
 
-	if (port->tty)
-		port->tty->low_latency = low_latency;
+	port->tty->low_latency = low_latency;
 
 	port_number = port->number - port->serial->minor;
 	switch (port_number) {
_

Patches currently in -mm which might be from ray-lk@xxxxxxxxxxxxx are

drivers-usb-serial-io_tic-remove-unneeded-null-tty-check.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux