Commit 4f9195e3 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Mauro Carvalho Chehab

media: atmel-isi: move of_node_put() to cover success branch as well

The of_node_put() was only covering the error branch but missed the
success branch so the refcount for ep which
of_graph_get_remote_port_parent() incremented on success would was
not being decremented.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e8ced209
...@@ -1111,10 +1111,9 @@ static int isi_graph_parse(struct atmel_isi *isi, struct device_node *node) ...@@ -1111,10 +1111,9 @@ static int isi_graph_parse(struct atmel_isi *isi, struct device_node *node)
return -EINVAL; return -EINVAL;
remote = of_graph_get_remote_port_parent(ep); remote = of_graph_get_remote_port_parent(ep);
if (!remote) { of_node_put(ep);
of_node_put(ep); if (!remote)
return -EINVAL; return -EINVAL;
}
/* Remote node to connect */ /* Remote node to connect */
isi->entity.node = remote; isi->entity.node = remote;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment