* [patch] synclink: add mutex_unlock() on error path
@ 2010-08-11 18:01 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-08-11 18:01 UTC (permalink / raw)
To: kernel-janitors
There is a path which still holds its mutex here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index fef80cf..e63b830 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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-11 18:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11 18:01 [patch] synclink: add mutex_unlock() on error path Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).