drm: of: drm_of_panel_bridge_remove(): fix device_node leak
[ Upstream commit a4b4385d0523e39a7c058cb5a6c8269e513126ca ]
drm_of_panel_bridge_remove() uses of_graph_get_remote_node() to get a
device_node but does not put the node reference.
Fixes: c70087e8f1 ("drm/drm_of: add drm_of_panel_bridge_remove function")
Cc: stable@vger.kernel.org # v4.15
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260109-drm-bridge-alloc-getput-drm_of_find_bridge-2-v2-1-8bad3ef90b9f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
1 parent
8058038a11
commit
8a80fa5081
1 file changed
+3
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <linux/of_graph.h>
|
||||
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
|
||||
#include <linux/of.h>
|
||||
#include <drm/drm_bridge.h>
|
||||
#endif
|
||||
|
||||
@@ -101,6 +102,8 @@ static inline int drm_of_panel_bridge_remove(const struct device_node *np,
|
||||
bridge = of_drm_find_bridge(remote);
|
||||
drm_panel_bridge_remove(bridge);
|
||||
|
||||
of_node_put(remote);
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return -EINVAL;
|
||||
|
||||
Reference in new issue
Block a user