projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b3aa71
)
media: lirc: release lock before sleep
author
Sean Young
<
[email protected]
>
Wed, 13 Dec 2017 21:30:22 +0000
(16:30 -0500)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Mon, 18 Dec 2017 20:22:24 +0000
(15:22 -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
patch
|
blob
|
history
diff --git
a/drivers/media/rc/lirc_dev.c
b/drivers/media/rc/lirc_dev.c
index 1fc1fd665bceee9af7754c74414f1d267c140656..713d42e4b66125bf05446dbf3dc0a43ada9ffe68 100644
(file)
--- 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;
+ ret
urn
n;
out_kfree:
kfree(txbuf);
kfree(raw);