From 0bc6b13d925de689c3a9984e5c3fe336cd005494 Mon Sep 17 00:00:00 2001 From: Ray <1458889+Raybuntu@users.noreply.github.com> Date: Thu, 11 Apr 2019 11:57:21 +0200 Subject: [PATCH] cec: Fix kernel log spam when cec is disabled --- drivers/amlogic/cec/hdmi_ao_cec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index d40706fb27d1..c7cf69eb88ef 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -2935,8 +2935,12 @@ static ssize_t hdmitx_cec_write(struct file *f, const char __user *buf, if (cec_cfg & CEC_FUNC_CFG_CEC_ON) { /*cec module on*/ ret = cec_ll_tx(tempbuf, size); + } + + if (ret == CEC_FAIL_NACK) { + return -1; } else { - CEC_ERR("err:cec module disabled\n"); + return size; } return ret;