tree-wide: fix 'lenght' typo in comments and code
[linux-2.6-block.git] / drivers / char / tty_io.c
index f15df40bc318fc90fd9825fab91a10a528e2d617..c6f3b48be9dd68cc37c4847eb8cab4b268ec4c90 100644 (file)
@@ -1951,8 +1951,8 @@ static int tty_fasync(int fd, struct file *filp, int on)
                        pid = task_pid(current);
                        type = PIDTYPE_PID;
                }
-               spin_unlock_irqrestore(&tty->ctrl_lock, flags);
                retval = __f_setown(filp, pid, type, 0);
+               spin_unlock_irqrestore(&tty->ctrl_lock, flags);
                if (retval)
                        goto out;
        } else {