Merge tag '4.21-smb3-small-fixes' of git://git.samba.org/sfrench/cifs-2.6
[linux-2.6-block.git] / drivers / tty / n_hdlc.c
index 99460af61b7712a6339b04bb4fd3d7561c9cc9e6..4164414d4c64b266dfce58772241cb009363f4c0 100644 (file)
@@ -573,7 +573,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
                return -EIO;
 
        /* verify user access to buffer */
-       if (!access_ok(VERIFY_WRITE, buf, nr)) {
+       if (!access_ok(buf, nr)) {
                printk(KERN_WARNING "%s(%d) n_hdlc_tty_read() can't verify user "
                "buffer\n", __FILE__, __LINE__);
                return -EFAULT;