diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-08 13:26:50 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2016-11-11 17:54:04 +0100 |
commit | 2fbd69c4e33360383907cf0abb245440e62a6f37 (patch) | |
tree | 71778f45768c74d97deffbcaac7be37d7f083faf /drivers/usb/serial/ftdi_sio.c | |
parent | USB: serial: ch341: add debug output for chip version (diff) | |
download | linux-2fbd69c4e33360383907cf0abb245440e62a6f37.tar.xz 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/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index b2d767e743fc..bf750e98d204 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1452,8 +1452,6 @@ static int get_serial_info(struct usb_serial_port *port, struct ftdi_private *priv = usb_get_serial_port_data(port); struct serial_struct tmp; - if (!retinfo) - return -EFAULT; memset(&tmp, 0, sizeof(tmp)); tmp.flags = priv->flags; tmp.baud_base = priv->baud_base; @@ -1535,9 +1533,6 @@ static int get_lsr_info(struct usb_serial_port *port, struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned int result = 0; - if (!retinfo) - return -EFAULT; - if (priv->transmit_empty) result = TIOCSER_TEMT; |