1
0
Fork 0

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>
hifive-unleashed-5.1
Jiri Slaby 2011-03-23 10:48:37 +01:00 committed by Greg Kroah-Hartman
parent a9dccddb60
commit 0259894c73
1 changed files with 1 additions and 0 deletions

View File

@ -1894,6 +1894,7 @@ got_driver:
retval = tty_add_file(tty, filp);
if (retval) {
tty_unlock();
tty_release(inode, filp);
return retval;
}