Commit 6f8ada12 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c31ef91
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1012,8 +1012,6 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
{
	struct serial_struct tmp;
   
	if (!retinfo)
		return -EFAULT;
	memset(&tmp, 0, sizeof(tmp));
	tty_lock(tty);
	tmp.line = tty->index;