UPSTREAM: media: cec: cec_transmit_attempt_done: ignore

CEC_TX_STATUS_MAX_RETRIES

The switch in cec_transmit_attempt_done() should ignore the
CEC_TX_STATUS_MAX_RETRIES status bit.

Calling this function with e.g. CEC_TX_STATUS_NACK | CEC_TX_STATUS_MAX_RETRIES
is perfectly legal and should not trigger the WARN(1).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit bd34ca8758)

Change-Id: I0db57343d0a922b2154e8b10979b226f116b750c
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao 2017-12-26 14:48:50 +08:00 committed by Tao Huang
parent 8d7bc62a9b
commit b833ecb647

View File

@ -609,7 +609,7 @@ EXPORT_SYMBOL_GPL(cec_transmit_done_ts);
void cec_transmit_attempt_done_ts(struct cec_adapter *adap,
u8 status, ktime_t ts)
{
switch (status) {
switch (status & ~CEC_TX_STATUS_MAX_RETRIES) {
case CEC_TX_STATUS_OK:
cec_transmit_done_ts(adap, status, 0, 0, 0, 0, ts);
return;