Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>

authored by

Peter Chen and committed by
Sean Paul
2ab9f587 0697a05f

+4 -3
+4 -3
drivers/gpu/drm/omapdrm/dss/dss-of.c
··· 125 125 126 126 static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) 127 127 { 128 - struct device_node *np; 128 + struct device_node *np, *np_parent; 129 129 130 130 np = of_parse_phandle(node, "remote-endpoint", 0); 131 131 if (!np) 132 132 return NULL; 133 133 134 - np = of_get_next_parent(np); 134 + np_parent = of_get_next_parent(np); 135 + of_node_put(np); 135 136 136 - return np; 137 + return np_parent; 137 138 } 138 139 139 140 struct device_node *