drm/bridge: lt9611uxc: Fix DSI device node leak in lt9611uxc_probe()
Subsystems (4)
PATCH 1/1 drm/bridge: lt9611uxc: Fix DSI device node leak in lt9611uxc_probe()
lt9611uxc_parse_dt() obtains references to the primary and secondary DSI remote nodes with of_graph_get_remote_node() and stores them in dsi0_node and dsi1_node. If the following lookup of the panel or bridge with drm_of_find_panel_or_bridge() fails, lt9611uxc_probe() returns without calling of_node_put() on the DSI nodes, leaking the references taken by of_graph_get_remote_node().
The error paths further down in lt9611uxc_probe() already release both nodes through the err_of_put label. Route the device tree parsing failure to that label as well so the node references are dropped on that error path too.
Fixes 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge")
Signed-off-by Wentao Liang <[email protected]>
--- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/lontium-lt9611uxc.c +1 -1
@@ -765,7 +765,7 @@ static int lt9611uxc_probe(struct i2c_client *client) ret =lt9611uxc_parse_dt (dev, lt9611uxc);if (ret) {dev_err (dev,"failed to parse device tree\n" ); -return ret; + goto err_of_put; } ret =lt9611uxc_gpio_init (lt9611uxc);
Signature · 1 line
2.34.1