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]
Message-ID: <20061008231630.GP6755@stusta.de>
Date:	Mon, 9 Oct 2006 01:16:30 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	Paul B Schroeder <pschroeder@...ogix.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...e.de,
	linux-usb-devel@...ts.sourceforge.net
Subject: [RFC: 2.6 patch] drivers/usb/serial/mos7840.c: remove dead code

The Coverity checker spotted this dead code.

Signed-off-by: Adrian Bunk <bunk@...sta.de>

---

 drivers/usb/serial/mos7840.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

--- linux-2.6/drivers/usb/serial/mos7840.c.old	2006-10-09 00:31:41.000000000 +0200
+++ linux-2.6/drivers/usb/serial/mos7840.c	2006-10-09 00:32:12.000000000 +0200
@@ -1420,7 +1420,6 @@
 	int i;
 	int bytes_sent = 0;
 	int transfer_size;
-	int from_user = 0;
 
 	struct moschip_port *mos7840_port;
 	struct usb_serial *serial;
@@ -1511,15 +1510,7 @@
 	}
 	transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
 
-	if (from_user) {
-		if (copy_from_user
-		    (urb->transfer_buffer, current_position, transfer_size)) {
-			bytes_sent = -EFAULT;
-			goto exit;
-		}
-	} else {
-		memcpy(urb->transfer_buffer, current_position, transfer_size);
-	}
+	memcpy(urb->transfer_buffer, current_position, transfer_size);
 
 	/* fill urb with data and submit  */
 	usb_fill_bulk_urb(urb,

-
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