All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cec-adap: fix regression in ping sanity check
@ 2019-05-29  8:22 Hans Verkuil
  0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2019-05-29  8:22 UTC (permalink / raw)
  To: Linux Media Mailing List

Commit b6c96e156825 inadvertently also dropped the 'msg->len > 1' test
from the preceding sanity check. This caused compliance test failures.

Fixes: b6c96e156825 ("media: cec: allow any initiator for Ping and Image/Text View On")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/cec/cec-adap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index 5827d8c3742a..ac3683a7b2ab 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -809,7 +809,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
 				__func__);
 			return -EINVAL;
 		}
-		if (adap->is_configured &&
+		if (msg->len > 1 && adap->is_configured &&
 		    !cec_has_log_addr(adap, cec_msg_initiator(msg))) {
 			dprintk(1, "%s: initiator has unknown logical address %d\n",
 				__func__, cec_msg_initiator(msg));
-- 
2.20.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-29  8:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29  8:22 [PATCH] cec-adap: fix regression in ping sanity check Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.