static int pty_set_lock(struct tty_struct *tty, int __user *arg)
 {
        int val;
+
        if (get_user(val, arg))
                return -EFAULT;
        if (val)
 static int pty_get_lock(struct tty_struct *tty, int __user *arg)
 {
        int locked = test_bit(TTY_PTY_LOCK, &tty->flags);
+
        return put_user(locked, arg);
 }
 
 static int pty_get_pktmode(struct tty_struct *tty, int __user *arg)
 {
        int pktmode = tty->packet;
+
        return put_user(pktmode, arg);
 }
 
 static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
 {
        struct tty_struct *pair = tty->link;
+
        driver->ttys[tty->index] = NULL;
        if (pair)
                pair->driver->ttys[pair->index] = NULL;