X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Ftty_io.c;h=bc84e125c6bc428ca1d51cbcb29909466ea96b87;hb=a56cdcb662032a732f7c4f35cc5a9acf37759d8c;hp=d33e5ab061779a67e63b305b30b29d01f6fe38ca;hpb=30aae739a9eb6db31ad7b08dac44bd302f41c709;p=linux-2.6-omap-h63xx.git 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) {