hdmirx: fix coverity errors
authoryicheng shen <yicheng.shen@amlogic.com>
Thu, 21 Jun 2018 11:32:22 +0000 (19:32 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 25 Jun 2018 01:57:18 +0000 (18:57 -0700)
PD#167692: hdmirx: fix coverity errors

Change-Id: I685ff24dc791a2bfd233c7f6db3ce23bf6744207
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.c
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.c

index 3255e70..8903a58 100644 (file)
@@ -155,7 +155,7 @@ static long set_data(struct esm_device *esm, void __user *arg)
                unsigned char buf[sizeof(struct esm_ioc_data) + 1];
        } u;
 
-       if (copy_from_user(&u.data, arg, sizeof(u.buf)) != 0)
+       if (copy_from_user(&u.data, arg, sizeof(u.data)) != 0)
                return -EFAULT;
 
        if (esm->data_size < u.data.len)
index 948a66a..ec16d84 100644 (file)
@@ -46,7 +46,7 @@
  *
  *
  */
-#define RX_VER2 "ver.2018/06/14"
+#define RX_VER2 "ver.2018/06/21"
 
 
 /* 50ms timer for hdmirx main loop (HDMI_STATE_CHECK_FREQ is 20) */
index 02cdd51..367b9d6 100644 (file)
@@ -1803,10 +1803,12 @@ void rx_edid_parse_print(struct edid_info_s *edid_info)
                if ((hdmi_vic >= 1) && (hdmi_vic <= 64)) {
                        rx_pr("vic: %3d, format: %s\n",
                                hdmi_vic, hdmi_fmt[hdmi_vic]);
-               } else if ((hdmi_vic >= 65) && (hdmi_vic <= 127)) {
+               } else if ((hdmi_vic >= 65) && (hdmi_vic <= 107)) {
                        /* from first new set */
                        rx_pr("vic: %3d, format: %s\n",
                        hdmi_vic, hdmi_fmt[hdmi_vic]);
+               } else if ((hdmi_vic >= 108) && (hdmi_vic <= 127)) {
+                       /* from first new set: 8bit VIC */
                } else if ((hdmi_vic >= 129) && (hdmi_vic <= 192)) {
                        hdmi_vic &= 0x7F;
                        rx_pr("vic: %3d, native format: %s\n",
@@ -1844,7 +1846,7 @@ void rx_edid_parse_print(struct edid_info_s *edid_info)
                                if (bit_rate->pcm.size_20bit)
                                        rx_pr("\t20bit\n");
                                if (bit_rate->pcm.size_24bit)
-                                       rx_pr("\t24bit: %d\n");
+                                       rx_pr("\t24bit\n");
                        } else if ((fmt >= AUDIO_FORMAT_AC3) &&
                                (fmt <= AUDIO_FORMAT_ATRAC)) {
                                rx_pr("max bit rate: %dkHz\n",