* [PATCH] [media] media: mtk-mdp: fix reference count on old device tree
@ 2019-06-21 11:32 ` Matthias Brugger
0 siblings, 0 replies; 9+ messages in thread
From: Matthias Brugger @ 2019-06-21 11:32 UTC (permalink / raw)
To: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz
Cc: linux-media, linux-arm-kernel, linux-mediatek, linux-kernel,
stable, Matthias Brugger
of_get_next_child() increments the reference count of the returning
device_node. Decrement it in the check if we are using the old or the
new DTB.
Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree")
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
index bbb24fb95b95..bafe53c5d54a 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
@@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev)
mutex_init(&mdp->vpulock);
/* Old dts had the components as child nodes */
- if (of_get_next_child(dev->of_node, NULL)) {
+ parent = of_get_next_child(dev->of_node, NULL);
+ if (parent) {
+ of_node_put(parent);
parent = dev->of_node;
dev_warn(dev, "device tree is out of date\n");
} else {
--
2.21.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH] [media] media: mtk-mdp: fix reference count on old device tree @ 2019-06-21 11:32 ` Matthias Brugger 0 siblings, 0 replies; 9+ messages in thread From: Matthias Brugger @ 2019-06-21 11:32 UTC (permalink / raw) To: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz Cc: linux-kernel, stable, linux-mediatek, Matthias Brugger, linux-arm-kernel, linux-media of_get_next_child() increments the reference count of the returning device_node. Decrement it in the check if we are using the old or the new DTB. Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> --- drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c index bbb24fb95b95..bafe53c5d54a 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) mutex_init(&mdp->vpulock); /* Old dts had the components as child nodes */ - if (of_get_next_child(dev->of_node, NULL)) { + parent = of_get_next_child(dev->of_node, NULL); + if (parent) { + of_node_put(parent); parent = dev->of_node; dev_warn(dev, "device tree is out of date\n"); } else { -- 2.21.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree 2019-06-21 11:32 ` Matthias Brugger @ 2019-06-21 13:22 ` Greg KH -1 siblings, 0 replies; 9+ messages in thread From: Greg KH @ 2019-06-21 13:22 UTC (permalink / raw) To: Matthias Brugger Cc: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz, linux-media, linux-arm-kernel, linux-mediatek, linux-kernel, stable On Fri, Jun 21, 2019 at 01:32:50PM +0200, Matthias Brugger wrote: > of_get_next_child() increments the reference count of the returning > device_node. Decrement it in the check if we are using the old or the > new DTB. > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> > --- > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree @ 2019-06-21 13:22 ` Greg KH 0 siblings, 0 replies; 9+ messages in thread From: Greg KH @ 2019-06-21 13:22 UTC (permalink / raw) To: Matthias Brugger Cc: andrew-ct.chen, minghsiu.tsai, linux-kernel, djkurtz, linux-mediatek, houlong.wei, stable, mchehab, linux-arm-kernel, linux-media On Fri, Jun 21, 2019 at 01:32:50PM +0200, Matthias Brugger wrote: > of_get_next_child() increments the reference count of the returning > device_node. Decrement it in the check if we are using the old or the > new DTB. > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> > --- > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree 2019-06-21 11:32 ` Matthias Brugger (?) @ 2019-07-08 9:06 ` Matthias Brugger -1 siblings, 0 replies; 9+ messages in thread From: Matthias Brugger @ 2019-07-08 9:06 UTC (permalink / raw) To: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz, Hans Verkuil Cc: linux-media, linux-arm-kernel, linux-mediatek, linux-kernel, stable On 21/06/2019 13:32, Matthias Brugger wrote: > of_get_next_child() increments the reference count of the returning > device_node. Decrement it in the check if we are using the old or the > new DTB. > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Any comments on that? > --- > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > index bbb24fb95b95..bafe53c5d54a 100644 > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) > mutex_init(&mdp->vpulock); > > /* Old dts had the components as child nodes */ > - if (of_get_next_child(dev->of_node, NULL)) { > + parent = of_get_next_child(dev->of_node, NULL); > + if (parent) { > + of_node_put(parent); > parent = dev->of_node; > dev_warn(dev, "device tree is out of date\n"); > } else { > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree @ 2019-07-08 9:06 ` Matthias Brugger 0 siblings, 0 replies; 9+ messages in thread From: Matthias Brugger @ 2019-07-08 9:06 UTC (permalink / raw) To: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz, Hans Verkuil, Mauro Carvalho Chehab Cc: linux-media, linux-arm-kernel, linux-mediatek, linux-kernel, stable On 21/06/2019 13:32, Matthias Brugger wrote: > of_get_next_child() increments the reference count of the returning > device_node. Decrement it in the check if we are using the old or the > new DTB. > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Any comments on that? > --- > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > index bbb24fb95b95..bafe53c5d54a 100644 > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) > mutex_init(&mdp->vpulock); > > /* Old dts had the components as child nodes */ > - if (of_get_next_child(dev->of_node, NULL)) { > + parent = of_get_next_child(dev->of_node, NULL); > + if (parent) { > + of_node_put(parent); > parent = dev->of_node; > dev_warn(dev, "device tree is out of date\n"); > } else { > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree @ 2019-07-08 9:06 ` Matthias Brugger 0 siblings, 0 replies; 9+ messages in thread From: Matthias Brugger @ 2019-07-08 9:06 UTC (permalink / raw) To: minghsiu.tsai, houlong.wei, andrew-ct.chen, mchehab, djkurtz, Hans Verkuil, Mauro Carvalho Chehab Cc: stable, linux-mediatek, linux-kernel, linux-arm-kernel, linux-media On 21/06/2019 13:32, Matthias Brugger wrote: > of_get_next_child() increments the reference count of the returning > device_node. Decrement it in the check if we are using the old or the > new DTB. > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Any comments on that? > --- > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > index bbb24fb95b95..bafe53c5d54a 100644 > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) > mutex_init(&mdp->vpulock); > > /* Old dts had the components as child nodes */ > - if (of_get_next_child(dev->of_node, NULL)) { > + parent = of_get_next_child(dev->of_node, NULL); > + if (parent) { > + of_node_put(parent); > parent = dev->of_node; > dev_warn(dev, "device tree is out of date\n"); > } else { > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree 2019-07-08 9:06 ` Matthias Brugger @ 2019-07-12 7:23 ` houlong wei -1 siblings, 0 replies; 9+ messages in thread From: houlong wei @ 2019-07-12 7:23 UTC (permalink / raw) To: Matthias Brugger Cc: Minghsiu Tsai (蔡明修), Andrew-CT Chen (陳智迪), mchehab@kernel.org, djkurtz@chromium.org, Hans Verkuil, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org On Mon, 2019-07-08 at 17:06 +0800, Matthias Brugger wrote: > > On 21/06/2019 13:32, Matthias Brugger wrote: > > of_get_next_child() increments the reference count of the returning > > device_node. Decrement it in the check if we are using the old or the > > new DTB. > > > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> > > Any comments on that? > Hi Matthias, Thanks for fixing the bug. Sorry to reply late~ Acked-by: Houlong Wei <houlong.wei@mediatek.com> > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > index bbb24fb95b95..bafe53c5d54a 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) > > mutex_init(&mdp->vpulock); > > > > /* Old dts had the components as child nodes */ > > - if (of_get_next_child(dev->of_node, NULL)) { > > + parent = of_get_next_child(dev->of_node, NULL); > > + if (parent) { > > + of_node_put(parent); > > parent = dev->of_node; > > dev_warn(dev, "device tree is out of date\n"); > > } else { > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree @ 2019-07-12 7:23 ` houlong wei 0 siblings, 0 replies; 9+ messages in thread From: houlong wei @ 2019-07-12 7:23 UTC (permalink / raw) To: Matthias Brugger Cc: Andrew-CT Chen (陳智迪), Minghsiu Tsai (蔡明修), linux-kernel@vger.kernel.org, djkurtz@chromium.org, Hans Verkuil, stable@vger.kernel.org, linux-mediatek@lists.infradead.org, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org On Mon, 2019-07-08 at 17:06 +0800, Matthias Brugger wrote: > > On 21/06/2019 13:32, Matthias Brugger wrote: > > of_get_next_child() increments the reference count of the returning > > device_node. Decrement it in the check if we are using the old or the > > new DTB. > > > > Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") > > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> > > Any comments on that? > Hi Matthias, Thanks for fixing the bug. Sorry to reply late~ Acked-by: Houlong Wei <houlong.wei@mediatek.com> > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > index bbb24fb95b95..bafe53c5d54a 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > > @@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev) > > mutex_init(&mdp->vpulock); > > > > /* Old dts had the components as child nodes */ > > - if (of_get_next_child(dev->of_node, NULL)) { > > + parent = of_get_next_child(dev->of_node, NULL); > > + if (parent) { > > + of_node_put(parent); > > parent = dev->of_node; > > dev_warn(dev, "device tree is out of date\n"); > > } else { > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-07-12 7:24 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-21 11:32 [PATCH] [media] media: mtk-mdp: fix reference count on old device tree Matthias Brugger 2019-06-21 11:32 ` Matthias Brugger 2019-06-21 13:22 ` Greg KH 2019-06-21 13:22 ` Greg KH 2019-07-08 9:06 ` Matthias Brugger 2019-07-08 9:06 ` Matthias Brugger 2019-07-08 9:06 ` Matthias Brugger 2019-07-12 7:23 ` houlong wei 2019-07-12 7:23 ` houlong wei
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.