]> git.baikalelectronics.ru Git - kernel.git/commit
drm/meson: add missing of_node_put
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 13 Jan 2019 09:44:51 +0000 (10:44 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 14 Jan 2019 15:36:43 +0000 (16:36 +0100)
commitcb8830f31218ed66467f81afed539787082c1661
tree5645acf162457dbc0d165666abb164064b21ec4a
parent5ec6f9a51e67b3dd03063629222e6832e97104e0
drm/meson: add missing of_node_put

Add an of_node_put when the result of of_graph_get_remote_port_parent is
not available.

An of_node_put is also needed when meson_probe_remote completes.  This was
present at the recursive call, but not in the call from meson_drv_probe.

The semantic match that finds this problem is as follows
(http://coccinelle.lip6.fr):

// <smpl>
@r exists@
local idexpression e;
expression x;
@@
e = of_graph_get_remote_port_parent(...);
... when != x = e
    when != true e == NULL
    when != of_node_put(e)
    when != of_fwnode_handle(e)
(
return e;
|
*return ...;
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1547372691-28324-4-git-send-email-Julia.Lawall@lip6.fr
drivers/gpu/drm/meson/meson_drv.c