[PATCH 1/1] Staging: lirc, fix lock imbalance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Cc: Jarod Wilson <jarod@xxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
 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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux