summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb_wwan.c
diff options
context:
space:
mode:
authorJohan Hovold2016-11-08 13:26:50 +0100
committerJohan Hovold2016-11-11 17:54:04 +0100
commit2fbd69c4e33360383907cf0abb245440e62a6f37 (patch)
tree71778f45768c74d97deffbcaac7be37d7f083faf /drivers/usb/serial/usb_wwan.c
parentUSB: serial: ch341: add debug output for chip version (diff)
downloadkernel-qcow2-linux-2fbd69c4e33360383907cf0abb245440e62a6f37.tar.gz
kernel-qcow2-linux-2fbd69c4e33360383907cf0abb245440e62a6f37.tar.xz
kernel-qcow2-linux-2fbd69c4e33360383907cf0abb245440e62a6f37.zip
USB: serial: fix invalid user-pointer checks
Drop invalid user-pointer checks from ioctl handlers. A NULL-pointer can be valid in user space and copy_to_user() takes care of sanity checking. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/usb_wwan.c')
-rw-r--r--drivers/usb/serial/usb_wwan.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 3dfdfc81254b..59bfcb3da116 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -140,9 +140,6 @@ static int get_serial_info(struct usb_serial_port *port,
{
struct serial_struct tmp;
- if (!retinfo)
- return -EFAULT;
-
memset(&tmp, 0, sizeof(tmp));
tmp.line = port->minor;
tmp.port = port->port_number;