This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: lirc: release lock before sleep
Author:  Sean Young <[email protected]>
Date:    Wed Dec 13 16:30:22 2017 -0500

There is no reason to hold the lock while we wait for the IR to transmit.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/rc/lirc_dev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 1fc1fd665bce..713d42e4b661 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -347,6 +347,10 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, 
const char __user *buf,
        if (ret < 0)
                goto out_kfree;
 
+       kfree(txbuf);
+       kfree(raw);
+       mutex_unlock(&dev->lock);
+
        /*
         * The lircd gap calculation expects the write function to
         * wait for the actual IR signal to be transmitted before
@@ -359,7 +363,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const 
char __user *buf,
                schedule_timeout(usecs_to_jiffies(towait));
        }
 
-       ret = n;
+       return n;
 out_kfree:
        kfree(txbuf);
        kfree(raw);

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to