Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f9cbbd5 authored by Hans Verkuil's avatar Hans Verkuil Committed by Ray Zhang
Browse files

[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.

Change-Id: I36309acfe19b42b672d7b2051adf5cf514123cba
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 8991a63d1a8a01938932319c8b98f5a3420a0bb2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git


Signed-off-by: default avatarRay Zhang <rayz@codeaurora.org>
parent 7e4ec7df
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);