Skip to content

Commit 633592f

Browse files
author
Jocelyn Falempe
committed
fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
JIRA: https://issues.redhat.com/browse/RHEL-75959 Upstream Status: v6.14-rc1 commit de124b6 Author: Joe Hattori <[email protected]> AuthorDate: Wed Jan 8 10:15:37 2025 +0900 Commit: Helge Deller <[email protected]> CommitDate: Thu Jan 9 00:35:09 2025 +0100 dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_parent() obtains a reference of the returned OF node, call of_node_put() before returning NULL. This was found by an experimental verifier that I am developing, and no runtime test was able to be performed due to that lack of actual devices. Fixes: f76ee89 ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Joe Hattori <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Helge Deller <[email protected]> Signed-off-by: Jocelyn Falempe <[email protected]>
1 parent 973344e commit 633592f

File tree

1 file changed

+1
-0
lines changed
  • drivers/video/fbdev/omap2/omapfb/dss

1 file changed

+1
-0
lines changed

drivers/video/fbdev/omap2/omapfb/dss/dss-of.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct device_node *dss_of_port_get_parent_device(struct device_node *port)
3636
np = of_get_next_parent(np);
3737
}
3838

39+
of_node_put(np);
3940
return NULL;
4041
}
4142

0 commit comments

Comments
 (0)