diff --git a/drivers/media/cec/hdmi_ao_cec.c b/drivers/media/cec/hdmi_ao_cec.c index f5427991a..fb28cfdd5 100644 --- a/drivers/media/cec/hdmi_ao_cec.c +++ b/drivers/media/cec/hdmi_ao_cec.c @@ -505,6 +505,9 @@ static bool cec_need_store_msg_to_buff(void) * need to continue to store the received msg, * otherwise msg will be flushed and lost. */ + /* cec off, need not to store msg */ + if (!(cec_config(0, 0) & CEC_FUNC_CFG_CEC_ON)) + return false; if (!cec_dev->framework_on || cec_dev->msg_num > 0) return true; else diff --git a/drivers/media/cec/std_ao_cec.c b/drivers/media/cec/std_ao_cec.c index ec11b1e88..eba914d55 100644 --- a/drivers/media/cec/std_ao_cec.c +++ b/drivers/media/cec/std_ao_cec.c @@ -600,6 +600,9 @@ static bool cec_need_store_msg_to_buff(void) * need to continue to store the received msg, * otherwise msg will be flushed and lost. */ + /* cec off, need not to store msg */ + if (!(cec_config(0, 0) & CEC_FUNC_CFG_CEC_ON)) + return false; if (!cec_dev->framework_on || cec_dev->msg_num > 0) return true; else