Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0259894c authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

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: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9dccddb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1894,6 +1894,7 @@ got_driver:
	retval = tty_add_file(tty, filp);
	if (retval) {
		tty_unlock();
		tty_release(inode, filp);
		return retval;
	}