mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
fbdev: omapfb: Call of_node_put(ep) only once in omapdss_of_find_source_for_first_ep()
An of_node_put(ep) call was immediately used after a pointer check for a of_graph_get_remote_port() call in this function implementation. Thus call such a function only once instead directly before the check. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
5b97eebcce
commit
f1ebbe4cd0
1 changed files with 2 additions and 5 deletions
|
@ -129,12 +129,9 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
|
|||
return ERR_PTR(-EINVAL);
|
||||
|
||||
src_port = of_graph_get_remote_port(ep);
|
||||
if (!src_port) {
|
||||
of_node_put(ep);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
of_node_put(ep);
|
||||
if (!src_port)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
src = omap_dss_find_output_by_port_node(src_port);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue