Commit 1a4b8feb authored by Al Viro's avatar Al Viro
Browse files

n_hdlc_tty_read(): remove pointless access_ok()



only copy_to_user() is done to the address in question

Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 00fca6b5
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -423,13 +423,6 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
	struct n_hdlc_buf *rbuf;
	DECLARE_WAITQUEUE(wait, current);

	/* verify user access to buffer */
	if (!access_ok(buf, nr)) {
		pr_warn("%s(%d) %s() can't verify user buffer\n",
				__FILE__, __LINE__, __func__);
		return -EFAULT;
	}

	add_wait_queue(&tty->read_wait, &wait);

	for (;;) {