patch-2.4.10 linux/drivers/usb/serial/ftdi_sio.c

Next file: linux/drivers/usb/serial/io_edgeport.c
Previous file: linux/drivers/usb/serial/empeg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/usb/serial/ftdi_sio.c linux/drivers/usb/serial/ftdi_sio.c
@@ -470,8 +470,9 @@
 
 		/* Copy in the data to send */
 		if (from_user) {
-			copy_from_user(port->write_urb->transfer_buffer + data_offset , 
-				       buf, count - data_offset );
+			if (copy_from_user(port->write_urb->transfer_buffer + data_offset,
+					   buf, count - data_offset ))
+				return -EFAULT;
 		}
 		else {
 			memcpy(port->write_urb->transfer_buffer + data_offset,
@@ -1002,6 +1003,7 @@
 
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
 
 MODULE_PARM(debug, "i");
 MODULE_PARM_DESC(debug, "Debug enabled or not");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)