Skip to content

Commit a0747a0

Browse files
Nini Songsmb49
authored andcommitted
media: cec: core: remove length check of Timer Status
BugLink: https://bugs.launchpad.net/bugs/2065912 commit ce5d241c3ad4568c12842168288993234345c0eb upstream. The valid_la is used to check the length requirements, including special cases of Timer Status. If the length is shorter than 5, that means no Duration Available is returned, the message will be forced to be invalid. However, the description of Duration Available in the spec is that this parameter may be returned when these cases, or that it can be optionally return when these cases. The key words in the spec description are flexible choices. Remove the special length check of Timer Status to fit the spec which is not compulsory about that. Signed-off-by: Nini Song <nini.song@mediatek.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent 4ea90ee commit a0747a0

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

drivers/media/cec/core/cec-adap.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,20 +1151,6 @@ void cec_received_msg_ts(struct cec_adapter *adap,
11511151
if (valid_la && min_len) {
11521152
/* These messages have special length requirements */
11531153
switch (cmd) {
1154-
case CEC_MSG_TIMER_STATUS:
1155-
if (msg->msg[2] & 0x10) {
1156-
switch (msg->msg[2] & 0xf) {
1157-
case CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE:
1158-
case CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE:
1159-
if (msg->len < 5)
1160-
valid_la = false;
1161-
break;
1162-
}
1163-
} else if ((msg->msg[2] & 0xf) == CEC_OP_PROG_ERROR_DUPLICATE) {
1164-
if (msg->len < 5)
1165-
valid_la = false;
1166-
}
1167-
break;
11681154
case CEC_MSG_RECORD_ON:
11691155
switch (msg->msg[2]) {
11701156
case CEC_OP_RECORD_SRC_OWN:

0 commit comments

Comments
 (0)