diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-08 15:26:50 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2016-11-11 19:54:04 +0300 |
commit | 2fbd69c4e33360383907cf0abb245440e62a6f37 (patch) | |
tree | 71778f45768c74d97deffbcaac7be37d7f083faf /drivers/usb/serial/mos7840.c | |
parent | a98b69002a1656f1d50e24d6c189a66a5f55f783 (diff) | |
download | linux-2fbd69c4e33360383907cf0abb245440e62a6f37.tar.xz |
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/mos7840.c')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 57426d703a09..9a220b8e810f 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -1956,9 +1956,6 @@ static int mos7840_get_serial_info(struct moschip_port *mos7840_port, if (mos7840_port == NULL) return -1; - if (!retinfo) - return -EFAULT; - memset(&tmp, 0, sizeof(tmp)); tmp.type = PORT_16550A; |