lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 22 Feb 2008 08:12:43 -0800
From:	Ray Lee <ray-lk@...rabbit.org>
To:	LKML <linux-kernel@...r.kernel.org>
CC:	Alan Cox <alan@...rguk.ukuu.org.uk>, Adrian Bunk <bunk@...nel.org>,
	linux-usb@...r.kernel.org, Greg KH <gregkh@...e.de>
Subject: [patch] Remove unneeded null tty check in drivers/usb/serial/io_ti.c

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@...rabbit.org>

cc: linux-usb@...r.kernel.org
cc: Greg KH <gregkh@...e.de>
cc: Adrian Bunk <bunk@...nel.org>
cc: linux-kernel@...r.kernel.org
cc: Alan Cox <alan@...rguk.ukuu.org.uk>

Index: linux-2.6/drivers/usb/serial/io_ti.c
===================================================================
--- linux-2.6.orig/drivers/usb/serial/io_ti.c	2008-02-22 07:26:47.000000000 -0800
+++ linux-2.6/drivers/usb/serial/io_ti.c	2008-02-22 07:28:12.000000000 -0800
@@ -1944,8 +1944,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) {

-- 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ