From 2bb30f3496161544ccdf4d6328c664cc33169933 Mon Sep 17 00:00:00 2001 From: Yong Qin Date: Fri, 11 Oct 2019 10:19:31 +0800 Subject: [PATCH] cec: Fix coverity error [1/1] PD#SWPL-13936 Problem: Fix coverity error. Solution: Fix coverity error. Verify: TL1 Change-Id: I3e1af9370b47c1c9e06634f6cd4d04b2a229d664 Signed-off-by: Yong Qin --- drivers/amlogic/cec/hdmi_ao_cec.c | 4 ++-- drivers/amlogic/cec/hdmi_ao_cec.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index decb564..d8b91fa 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -2462,7 +2462,7 @@ static ssize_t cmda_store(struct class *cla, struct class_attribute *attr, for (i = 0; i < cnt; i++) buf[i] = (char)tmpbuf[i]; - if (cec_dev && (cec_dev->cec_num > ENABLE_ONE_CEC)) + if (cec_dev->cec_num > ENABLE_ONE_CEC) ceca_trigle_tx(buf, cnt); else CEC_ERR("ceca not valid\n"); @@ -2491,7 +2491,7 @@ static ssize_t cmdb_store(struct class *cla, struct class_attribute *attr, for (i = 0; i < cnt; i++) buf[i] = (char)tmpbuf[i]; - if (cec_dev && (cec_dev->cec_num > ENABLE_ONE_CEC)) + if (cec_dev->cec_num > ENABLE_ONE_CEC) cecb_trigle_tx(buf, cnt); else CEC_ERR("cecb not valid\n"); diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index 9fedb59..0a4f6b9 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -18,7 +18,7 @@ #ifndef __AO_CEC_H__ #define __AO_CEC_H__ -#define CEC_DRIVER_VERSION "2019/7/11: pretect resume received OTP again msg\n" +#define CEC_DRIVER_VERSION "2019/10/11: Fix coverity error\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec" -- 2.7.4