X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fchar%2Ftty_io.c;h=bc84e125c6bc428ca1d51cbcb29909466ea96b87;hb=2ed0ef543ae3f3ea4f8bd0433fb1fed22625a309;hp=d33e5ab061779a67e63b305b30b29d01f6fe38ca;hpb=e9af797d757d358f60130de6ca59ee658d666561;p=~andy%2Flinux diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index d33e5ab0617..bc84e125c6b 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1817,8 +1817,10 @@ got_driver: /* check whether we're reopening an existing tty */ tty = tty_driver_lookup_tty(driver, inode, index); - if (IS_ERR(tty)) + if (IS_ERR(tty)) { + mutex_unlock(&tty_mutex); return PTR_ERR(tty); + } } if (tty) {