提交 f81a8158 编写于 作者: S Sean Young 提交者: Mauro Carvalho Chehab

media: lirc: release lock before sleep

There is no reason to hold the lock while we wait for the IR to transmit.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 7b3aa714
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册