From: houlong wei <houlong.wei@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: "Minghsiu Tsai (蔡明修)" <Minghsiu.Tsai@mediatek.com>,
"Andrew-CT Chen (陳智迪)" <Andrew-CT.Chen@mediatek.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"djkurtz@chromium.org" <djkurtz@chromium.org>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree
Date: Fri, 12 Jul 2019 15:23:37 +0800 [thread overview]
Message-ID: <1562916217.29653.4.camel@mhfsdcap03> (raw)
In-Reply-To: <e4d178ae-f43e-21d0-b0ab-78cc2ac71e7e@gmail.com>
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 {
> >
WARNING: multiple messages have this Message-ID (diff)
From: houlong wei <houlong.wei@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: "Andrew-CT Chen (陳智迪)" <Andrew-CT.Chen@mediatek.com>,
"Minghsiu Tsai (蔡明修)" <Minghsiu.Tsai@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"djkurtz@chromium.org" <djkurtz@chromium.org>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH] [media] media: mtk-mdp: fix reference count on old device tree
Date: Fri, 12 Jul 2019 15:23:37 +0800 [thread overview]
Message-ID: <1562916217.29653.4.camel@mhfsdcap03> (raw)
In-Reply-To: <e4d178ae-f43e-21d0-b0ab-78cc2ac71e7e@gmail.com>
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
next prev parent reply other threads:[~2019-07-12 7:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-07-12 7:23 ` houlong wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1562916217.29653.4.camel@mhfsdcap03 \
--to=houlong.wei@mediatek.com \
--cc=Andrew-CT.Chen@mediatek.com \
--cc=Minghsiu.Tsai@mediatek.com \
--cc=djkurtz@chromium.org \
--cc=hans.verkuil@cisco.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.