public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] drivers/usb/serial/mos7840.c: remove dead code
@ 2006-10-08 23:16 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-10-08 23:16 UTC (permalink / raw)
  To: Paul B Schroeder; +Cc: linux-kernel, gregkh, linux-usb-devel

The Coverity checker spotted this dead code.

Signed-off-by: Adrian Bunk <bunk@stusta.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,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-08 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-08 23:16 [RFC: 2.6 patch] drivers/usb/serial/mos7840.c: remove dead code Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox