mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
UPSTREAM: [media] cec: zero counters in cec_received_msg()
Make sure the TX counters are zeroed in the cec_msg struct.
Non-zero TX counters make no sense when a message is received,
and applications should not see non-zero values here.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 8991a63d1a)
Change-Id: Ia592fe3992b4897ad5589c6bbb0976d48d630b78
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This commit is contained in:
@@ -874,6 +874,10 @@ void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg)
|
||||
msg->sequence = msg->reply = msg->timeout = 0;
|
||||
msg->tx_status = 0;
|
||||
msg->tx_ts = 0;
|
||||
msg->tx_arb_lost_cnt = 0;
|
||||
msg->tx_nack_cnt = 0;
|
||||
msg->tx_low_drive_cnt = 0;
|
||||
msg->tx_error_cnt = 0;
|
||||
msg->flags = 0;
|
||||
memset(msg->msg + msg->len, 0, sizeof(msg->msg) - msg->len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user