[PATCH 1/1] Staging: lirc, fix lock imbalance
Jiri Slaby
jslaby at suse.cz
Sat Sep 4 12:12:33 UTC 2010
There is an omitted unlock in one fail path in vfd_write, jump to the
right place to unlock the lock.
Signed-off-by: Jiri Slaby <jslaby at suse.cz>
Cc: Jarod Wilson <jarod at redhat.com>
Cc: Mauro Carvalho Chehab <mchehab at redhat.com>
---
drivers/staging/lirc/lirc_sasem.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c
index b496ff1..433c3b8 100644
--- a/drivers/staging/lirc/lirc_sasem.c
+++ b/drivers/staging/lirc/lirc_sasem.c
@@ -386,8 +386,10 @@ static ssize_t vfd_write(struct file *file, const char *buf,
}
data_buf = memdup_user(buf, n_bytes);
- if (PTR_ERR(data_buf))
- return PTR_ERR(data_buf);
+ if (PTR_ERR(data_buf)) {
+ retval = PTR_ERR(data_buf);
+ goto exit;
+ }
memcpy(context->tx.data_buf, data_buf, n_bytes);
--
1.7.2.2
More information about the devel
mailing list