TTY: fix fail path in tty_open
authorJiri Slaby <jslaby@suse.cz>
Wed, 23 Mar 2011 09:48:37 +0000 (10:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 19 Apr 2011 21:43:01 +0000 (14:43 -0700)
commit0259894c732837c801565d038eaecdcf8fc5bbe7
treeaae559d20f622f024c87f5bab5524ee94e42c91b
parenta9dccddb60913056bcadaeeacfe0395447fd2472
TTY: fix fail path in tty_open

When tty_add_file fails we omit to clean up. Fix that by calling
tty_release appropriatelly.

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