Skip to content

Commit cb86354

Browse files
committed
drm/bridge: tc358767: fix uninitialized variable regression
Commit a59a271 ("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: a59a271 ("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>
1 parent 48f05c3 commit cb86354

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/bridge/tc358767.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,6 +2422,7 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode)
24222422
struct device_node *node = NULL;
24232423

24242424
for_each_endpoint_of_node(dev->of_node, node) {
2425+
of_graph_parse_endpoint(node, &endpoint);
24252426
if (endpoint.port == 2) {
24262427
of_property_read_u8_array(node, "toshiba,pre-emphasis",
24272428
tc->pre_emphasis,

0 commit comments

Comments
 (0)