diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-08 07:24:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-10 08:41:25 -0500 |
commit | 6f8ada1292904c8299daa019634b3cddcf2a31c3 (patch) | |
tree | c9cb8f3d7dcf8748e48d37bc5a0c70d5a7a9f786 /drivers/tty/amiserial.c | |
parent | 5c31ef91c06db7800ad573174bd92be4df34ecb2 (diff) |
tty: amiserial: fix invalid user-pointer check
Drop invalid user-pointer check from TIOCGSERIAL handler.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r-- | drivers/tty/amiserial.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 208f573495dc..dfbb974927f2 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -1012,8 +1012,6 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state, | |||
1012 | { | 1012 | { |
1013 | struct serial_struct tmp; | 1013 | struct serial_struct tmp; |
1014 | 1014 | ||
1015 | if (!retinfo) | ||
1016 | return -EFAULT; | ||
1017 | memset(&tmp, 0, sizeof(tmp)); | 1015 | memset(&tmp, 0, sizeof(tmp)); |
1018 | tty_lock(tty); | 1016 | tty_lock(tty); |
1019 | tmp.line = tty->index; | 1017 | tmp.line = tty->index; |