summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2016-11-09 17:10:59 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 20:49:01 +0300
commit8991a63d1a8a01938932319c8b98f5a3420a0bb2 (patch)
treec0389701d5e7e93ccf1c784a18d045d40a55e2b1 /drivers
parent104eda6d7e3e31fc1beb2c109c5566220d602245 (diff)
downloadlinux-8991a63d1a8a01938932319c8b98f5a3420a0bb2.tar.xz
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/cec/cec-adap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index ed76d7050b8a..d9c6f2c1c6fa 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -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);