mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
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 <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
a9dccddb60
commit
0259894c73
1 file changed
+1
@@ -1894,6 +1894,7 @@ got_driver:
|
||||
retval = tty_add_file(tty, filp);
|
||||
if (retval) {
|
||||
tty_unlock();
|
||||
tty_release(inode, filp);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user