[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250107110740.42892-1-dheeraj.linuxdev@gmail.com>
Date: Tue, 7 Jan 2025 16:37:40 +0530
From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
To: andrzej.hajda@...el.com,
neil.armstrong@...aro.org,
rfoss@...nel.org
Cc: Laurent.pinchart@...asonboard.com,
jonas@...boo.se,
jernej.skrabec@...il.com,
maarten.lankhorst@...ux.intel.com,
mripard@...nel.org,
tzimmermann@...e.de,
airlied@...il.com,
simona@...ll.ch,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
Subject: [PATCH drm-next] drm/bridge: it6505: Fix unreachable loop increment in KSV list check
The inner loop in it6505_hdcp_part2_ksvlist_check had an unreachable
increment due to returning true before the loop could continue.
Restructure the loop to only return after verifying all 5 entries
match, making the loop increment reachable.
Fixes: 0989c02c7a5c ("drm/bridge: it6505: fix HDCP CTS compare V matching")
Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602785
Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
---
drivers/gpu/drm/bridge/ite-it6505.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 88ef76a37fe6..2ff2245abdeb 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -2255,8 +2255,10 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
av[i][1] != av[i][2] || bv[i][0] != av[i][3])
break;
- DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
- return true;
+ if (i == 4) {
+ DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
+ return true;
+ }
}
}
--
2.34.1
Powered by blists - more mailing lists