When CEC_RECEIVE returns a message the original timeout field
was overwritten. Restore the timeout field.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
/* 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)
{
+ u32 timeout = msg->timeout;
int res;
do {
kfree(entry);
fh->queued_msgs--;
mutex_unlock(&fh->lock);
+ /* restore original timeout value */
+ msg->timeout = timeout;
return 0;
}