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 <[email protected]>
Cc: Jarod Wilson <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
---
 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


_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to