diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-11 20:01:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-24 03:17:21 +0200 |
commit | 80d04f22b0869a1145b36a90a83a79603ac92be8 (patch) | |
tree | 196b465c243e3b230530ffeda8ef3396bdd82a94 | |
parent | rocket: add a mutex_unlock() (diff) | |
download | linux-80d04f22b0869a1145b36a90a83a79603ac92be8.tar.xz linux-80d04f22b0869a1145b36a90a83a79603ac92be8.zip |
synclink: add mutex_unlock() on error path
There is a path which still holds its mutex here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/char/synclink_gt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index fef80cfcab5c..e63b830c86cc 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -691,8 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp) if (info->port.count == 1) { /* 1st open on this device, init hardware */ retval = startup(info); - if (retval < 0) + if (retval < 0) { + mutex_unlock(&info->port.mutex); goto cleanup; + } } mutex_unlock(&info->port.mutex); retval = block_til_ready(tty, filp, info); |