Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470675 > unrolled thread

[PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

Started byAndrey Utkin <andrey_utkin@fastmail.com>
First post2016-08-26 14:30 +0200
Last post2016-08-29 05:30 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent() Andrey Utkin <andrey_utkin@fastmail.com> - 2016-08-26 14:30 +0200
    Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed  to of_get_next_parent() Matthijs van Duin <matthijsvanduin@gmail.com> - 2016-08-27 14:00 +0200
      Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed  to of_get_next_parent() Matthijs van Duin <matthijsvanduin@gmail.com> - 2016-08-27 14:10 +0200
        RE: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed  to of_get_next_parent() Peter Chen <peter.chen@nxp.com> - 2016-08-29 05:30 +0200

#1470675 — [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

FromAndrey Utkin <andrey_utkin@fastmail.com>
Date2016-08-26 14:30 +0200
Subject[PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()
Message-ID<saoqJ-6S0-5@gated-at.bofh.it>
Fixes runtime error:

[    8.842806] OF: ERROR: Bad of_node_put() on /encoder/ports/port@1/endpoint
[    8.842812] CPU: 1 PID: 1494 Comm: systemd-udevd Not tainted 4.8.0-rc1-letux-custom #17
[    8.842815] Hardware name: Generic OMAP5 (Flattened Device Tree)
[    8.842831] [<c010b519>] (unwind_backtrace) from [<c010900b>] (show_stack+0xb/0xc)
[    8.842841] [<c010900b>] (show_stack) from [<c02bb281>] (dump_stack+0x6d/0x98)
[    8.842849] [<c02bb281>] (dump_stack) from [<c02bc91b>] (kobject_put+0x93/0x140)
[    8.842935] [<c02bc91b>] (kobject_put) from [<bf889433>] (omapdss_of_find_source_for_first_ep+0x2e/0x58 [omapdss])
[    8.843014] [<bf889433>] (omapdss_of_find_source_for_first_ep [omapdss]) from [<bf94f233>] (hdmic_probe+0x56/0x170 [connector_hdmi])
[    8.843030] [<bf94f233>] (hdmic_probe [connector_hdmi]) from [<c03216cd>] (platform_drv_probe+0x33/0x62)
[    8.843040] [<c03216cd>] (platform_drv_probe) from [<c03201db>] (driver_probe_device+0x11f/0x284)
[    8.843049] [<c03201db>] (driver_probe_device) from [<c032038d>] (__driver_attach+0x4d/0x98)
[    8.843057] [<c032038d>] (__driver_attach) from [<c031f085>] (bus_for_each_dev+0x3d/0x46)
[    8.843064] [<c031f085>] (bus_for_each_dev) from [<c031facb>] (bus_add_driver+0xe3/0x170)
[    8.843073] [<c031facb>] (bus_add_driver) from [<c0320d79>] (driver_register+0x59/0x88)
[    8.843083] [<c0320d79>] (driver_register) from [<bf95200b>] (hdmi_connector_driver_init+0xa/0x13 [connector_hdmi])
[    8.843095] [<bf95200b>] (hdmi_connector_driver_init [connector_hdmi]) from [<c010178d>] (do_one_initcall+0xc5/0xf0)
[    8.843108] [<c010178d>] (do_one_initcall) from [<c01b329b>] (do_init_module+0x3b/0x318)
[    8.843118] [<c01b329b>] (do_init_module) from [<c017f33d>] (load_module+0x13f3/0x1722)
[    8.843126] [<c017f33d>] (load_module) from [<c017f7b1>] (SyS_finit_module+0x51/0x74)
[    8.843135] [<c017f7b1>] (SyS_finit_module) from [<c0105bc1>] (ret_fast_syscall+0x1/0x18)

Signed-off-by: Andrey Utkin <andrey_utkin@fastmail.com>
---
 drivers/gpu/drm/omapdrm/dss/dss-of.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c
index e256d87..3e2b191 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
@@ -132,7 +132,6 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node *
 		return NULL;
 
 	np_parent = of_get_next_parent(np);
-	of_node_put(np);
 
 	return np_parent;
 }
-- 
2.9.2

[toc] | [next] | [standalone]


#1471154 — Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

FromMatthijs van Duin <matthijsvanduin@gmail.com>
Date2016-08-27 14:00 +0200
SubjectRe: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()
Message-ID<saKrf-44i-11@gated-at.bofh.it>
In reply to#1470675
To clarify, this patch effectively reverts

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

except it leaves behind unnecessary verbiage that this commit
introduced. And to be clear, that commit *should* indeed be reverted,
although preferably in its entirety obviously.

of_get_next_parent already drops a ref on its argument, so of_node_put
was never "missing" here.

Matthijs

[toc] | [prev] | [next] | [standalone]


#1471156 — Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

FromMatthijs van Duin <matthijsvanduin@gmail.com>
Date2016-08-27 14:10 +0200
SubjectRe: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()
Message-ID<saKAV-4mF-5@gated-at.bofh.it>
In reply to#1471154
> [    8.842806] OF: ERROR: Bad of_node_put() on /encoder/ports/port@1/endpoint
> [    8.843014] [<bf889433>] (omapdss_of_find_source_for_first_ep [omapdss])

I can confirm that reverting 2ab9f5879162 fixes this regression,
tested on omap5-uevm.

Matthijs

[toc] | [prev] | [next] | [standalone]


#1471525 — RE: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

FromPeter Chen <peter.chen@nxp.com>
Date2016-08-29 05:30 +0200
SubjectRE: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()
Message-ID<sblqN-20k-3@gated-at.bofh.it>
In reply to#1471156
 
>Sent: Saturday, August 27, 2016 8:07 PM
>To: Tomi Valkeinen <tomi.valkeinen@ti.com>; Tony Lindgren <tony@atomide.com>;
>Sean Paul <seanpaul@chromium.org>; Peter Chen <peter.chen@nxp.com>;
>Andrey Utkin <andrey_utkin@fastmail.com>
>Cc: David Airlie <airlied@linux.ie>; Peter Ujfalusi <peter.ujfalusi@ti.com>; Dave
>Airlie <airlied@gmail.com>; Rob Clark <robdclark@gmail.com>; Dr. H. Nikolaus
>Schaller <hns@goldelico.com>; Andrew Bradford <bradfa@gmail.com>;
>kernel@pyra-handheld.com; Discussions about the Letux Kernel <letux-
>kernel@openphoenux.org>; dri-devel@lists.freedesktop.org; lkml <linux-
>kernel@vger.kernel.org>; linux-omap@vger.kernel.org
>Subject: Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to
>of_get_next_parent()
>
>> [    8.842806] OF: ERROR: Bad of_node_put() on /encoder/ports/port@1/endpoint
>> [    8.843014] [<bf889433>] (omapdss_of_find_source_for_first_ep [omapdss])
>
>I can confirm that reverting 2ab9f5879162 fixes this regression, tested on omap5-
>uevm.
>

It was my careless for introducing regression. The revert patch has already been
at linux-next. Sorry for inconvenience.

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=5a78ff7bf7e25191144b550961001bbf6c734da4


Peter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web