From: Jiri Slaby <jslaby@xxxxxxx> When tty_add_file fails we omit to clean up. Fix that by calling tty_release appropriatelly. Signed-off-by: Jiri Slaby <jslaby@xxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/tty/tty_io.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 8540f2b..55bb456 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1894,6 +1894,7 @@ got_driver: retval = tty_add_file(tty, filp); if (retval) { tty_unlock(); + tty_release(inode, filp); return retval; } -- 1.7.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html