cec: Fix kernel log spam when cec is disabled
authorRay <1458889+Raybuntu@users.noreply.github.com>
Thu, 11 Apr 2019 09:57:21 +0000 (11:57 +0200)
committerMauro (mdrjr) Ribeiro <mauro.ribeiro@hardkernel.com>
Thu, 23 Jul 2020 13:44:52 +0000 (10:44 -0300)
drivers/amlogic/cec/hdmi_ao_cec.c

index d40706f..c7cf69e 100644 (file)
@@ -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;