pty: Fix locking bug on error path
authorAlan Cox <alan@linux.intel.com>
Wed, 19 Sep 2012 14:34:47 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Sep 2012 16:51:09 +0000 (09:51 -0700)
commit05fb79e45ee28b97a7cb74bd5ea3a88a8d13db1c
treeeec3011de3dd26155c1c0895b099e8ccd1926e2c
parent43eca0aef73cc6f0d37ad139f1cbb810e62e409d
pty: Fix locking bug on error path

We end up dropping the mutex twice on some errors. We don't want to do
that.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c