From: Hans Verkuil Date: Wed, 29 May 2019 08:22:15 +0000 (-0400) Subject: media: cec-adap: fix regression in ping sanity check X-Git-Tag: v5.3-rc1~170^2~268 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=64b42d8eee9b57d1329eeb338c3c30171a14cdbd;p=linux.git media: cec-adap: fix regression in ping sanity check 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 Signed-off-by: Mauro Carvalho Chehab --- 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));