summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2025-07-04 01:30:18 +0200
committerLuca Ceresoli <luca.ceresoli@bootlin.com>2025-07-07 13:07:52 +0200
commitcb863540e7c756abe7e709673a3e073c6a7aa8c0 (patch)
tree66718d242b69acd9b2e534820a4e3f98ce4fd86a
parent48f05c3b4b701ae7687fd44d462c88b7ac67e952 (diff)
drm/bridge: tc358767: fix uninitialized variable regressionHEADfor-linux-nextdrm-misc-next
Commit a59a27176914 ("drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API") split tc_probe_bridge_endpoint() in two functions, thus duplicating the loop over the endpoints in each of those functions. However it missed duplicating the of_graph_parse_endpoint() call which initializes the struct of_endpoint, resulting in an uninitialized read. Fixes: a59a27176914 ("drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API") Cc: stable@vger.kernel.org Reported-by: Colin King (gmail) <colin.i.king@gmail.com> Closes: https://lore.kernel.org/all/056b34c3-c1ea-4b8c-9672-c98903ffd012@gmail.com/ Reviewed-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250704-drm-bridge-alloc-fix-tc358767-regression-v2-1-ec0e511bedd0@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 61559467e2d2..562fea47b3ec 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -2422,6 +2422,7 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode)
struct device_node *node = NULL;
for_each_endpoint_of_node(dev->of_node, node) {
+ of_graph_parse_endpoint(node, &endpoint);
if (endpoint.port == 2) {
of_property_read_u8_array(node, "toshiba,pre-emphasis",
tc->pre_emphasis,