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

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

This reverts
commit 2ab9f5879162499e1c4e48613287e3f59e593c4f
Author: Peter Chen <peter.chen@nxp.com>
Date: Fri Jul 15 11:17:03 2016 +0800
gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

The of_get_next_parent will drop refcount on the passed node, so the reverted
patch is wrong, thanks for Tomi Valkeinen points it.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com

authored by

Peter Chen and committed by
Sean Paul
5a78ff7b 0c756134

+3 -4
+3 -4
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, *np_parent; 128 + struct device_node *np; 129 129 130 130 np = of_parse_phandle(node, "remote-endpoint", 0); 131 131 if (!np) 132 132 return NULL; 133 133 134 - np_parent = of_get_next_parent(np); 135 - of_node_put(np); 134 + np = of_get_next_parent(np); 136 135 137 - return np_parent; 136 + return np; 138 137 } 139 138 140 139 struct device_node *