From d78a0bfdd5d7dfcac53f6206de791b0cdca37935 Mon Sep 17 00:00:00 2001 From: Zongdong Jiao Date: Mon, 4 Sep 2017 20:35:35 +0800 Subject: [PATCH] hdmitx: clean up bad compare and dead code PD#150071: hdmitx: driver defect clean up: #2 #156 Change-Id: Icf9d9d0cd112344d9981ed33171b04f744930808 Signed-off-by: Zongdong Jiao Signed-off-by: Yi Zhou --- drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index 0fb1ec74..b36ee3d 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -2181,7 +2181,7 @@ static ssize_t show_hdcp_ver(struct device *dev, struct device_attribute *attr, char *buf) { int pos = 0; - uint32_t ver = 0; + uint32_t ver = 0U; if (check_fbc_special(&hdmitx_device.EDID_buf[0]) || check_fbc_special(&hdmitx_device.EDID_buf1[0])) { @@ -2203,13 +2203,10 @@ static ssize_t show_hdcp_ver(struct device *dev, } next: /* Detect RX support HDCP14 */ /* Here, must assume RX support HDCP14, otherwise affect 1A-03 */ - if (ver == 0) { + if (ver == 0U) { pos += snprintf(buf+pos, PAGE_SIZE, "14\n\r"); return pos; } - - /* RX NOT support HDCP */ - pos += snprintf(buf+pos, PAGE_SIZE, "00\n\r"); return pos; } @@ -2247,7 +2244,7 @@ static ssize_t store_ready(struct device *dev, { if (strncmp(buf, "0", 1) == 0) hdmitx_device.ready = 0; - if (strncmp(buf, "1", 1) == 1) + if (strncmp(buf, "1", 1) == 0) hdmitx_device.ready = 1; return count; } -- 2.7.4