TTY: move debug checking out of tty_release
authorJiri Slaby <jslaby@suse.cz>
Fri, 11 Nov 2011 09:47:23 +0000 (10:47 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 23:52:47 +0000 (15:52 -0800)
commit955787ca94a17bdfd00e369a21ceb97aa21792fc
tree16bd8e8a7c154be15dcb0c7375c4c8c2c7c019c9
parent2cd0050cf3ec4da847c3a2f7d95cffd548aef39d
TTY: move debug checking out of tty_release

There is no need to taint the tty_release code with paranoia
checking. So move it out of line to a separate function. Making thus
tty_release more readable.

[v2] don't introduce a hard to reproduce use after free (scheduled work would
     need to preempt the current thread)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/tty_io.c