[media] cec: CEC_RECEIVE overwrote the timeout field
When CEC_RECEIVE returns a message the original timeout field was overwritten. Restore the timeout field. Change-Id: Ida65e37e1424745e3e4cf9d0108e10dc75e642ed Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Git-commit: e883b4d02670ae83ab24e9af969de1af756959f8 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This commit is contained in:
parent
b58d42ad60
commit
a743a520d1
1 changed files with 3 additions and 0 deletions
|
@ -209,6 +209,7 @@ static long cec_transmit(struct cec_adapter *adap, struct cec_fh *fh,
|
||||||
/* Called by CEC_RECEIVE: wait for a message to arrive */
|
/* Called by CEC_RECEIVE: wait for a message to arrive */
|
||||||
static int cec_receive_msg(struct cec_fh *fh, struct cec_msg *msg, bool block)
|
static int cec_receive_msg(struct cec_fh *fh, struct cec_msg *msg, bool block)
|
||||||
{
|
{
|
||||||
|
u32 timeout = msg->timeout;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -225,6 +226,8 @@ static int cec_receive_msg(struct cec_fh *fh, struct cec_msg *msg, bool block)
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
fh->queued_msgs--;
|
fh->queued_msgs--;
|
||||||
mutex_unlock(&fh->lock);
|
mutex_unlock(&fh->lock);
|
||||||
|
/* restore original timeout value */
|
||||||
|
msg->timeout = timeout;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue