All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	airlied@linux.ie, daniel@ffwll.ch, mripard@kernel.org
Subject: Re: [PATCH -next] drm/logicvc: add missing of_node_put() in logicvc_layers_init()
Date: Fri, 24 Jun 2022 17:25:50 +0200	[thread overview]
Message-ID: <YrXXfhu5oPrBMPfu@aptenodytes> (raw)
In-Reply-To: <YrXMAvuHJgls+wNM@aptenodytes>

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Hi,

On Fri 24 Jun 22, 16:36, Paul Kocialkowski wrote:
> Hi Yang,
> 
> On Tue 14 Jun 22, 19:21, Yang Yingliang wrote:
> > The of_node_put() need be called in error path in logicvc_layers_init().
> > 
> > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> Thanks for the fix!
> 
> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Adapted this after Julia's patch: Only the put on layers_node is required
on error condition.

Pushed to drm-misc-next, thanks!

Paul

> > ---
> >  drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > index bae1c7f99569..00a37563a6dc 100644
> > --- a/drivers/gpu/drm/logicvc/logicvc_layer.c
> > +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > @@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc)
> >  		}
> >  
> >  		ret = logicvc_layer_init(logicvc, layer_node, index);
> > -		if (ret)
> > +		if (ret) {
> > +			of_node_put(layer_node);
> > +			of_node_put(layers_node);
> >  			goto error;
> > +		}
> >  
> >  		of_node_put(layer_node);
> >  	}
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Paul Kocialkowski, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com



-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH -next] drm/logicvc: add missing of_node_put() in logicvc_layers_init()
Date: Fri, 24 Jun 2022 17:25:50 +0200	[thread overview]
Message-ID: <YrXXfhu5oPrBMPfu@aptenodytes> (raw)
In-Reply-To: <YrXMAvuHJgls+wNM@aptenodytes>

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Hi,

On Fri 24 Jun 22, 16:36, Paul Kocialkowski wrote:
> Hi Yang,
> 
> On Tue 14 Jun 22, 19:21, Yang Yingliang wrote:
> > The of_node_put() need be called in error path in logicvc_layers_init().
> > 
> > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> Thanks for the fix!
> 
> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Adapted this after Julia's patch: Only the put on layers_node is required
on error condition.

Pushed to drm-misc-next, thanks!

Paul

> > ---
> >  drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > index bae1c7f99569..00a37563a6dc 100644
> > --- a/drivers/gpu/drm/logicvc/logicvc_layer.c
> > +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > @@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc)
> >  		}
> >  
> >  		ret = logicvc_layer_init(logicvc, layer_node, index);
> > -		if (ret)
> > +		if (ret) {
> > +			of_node_put(layer_node);
> > +			of_node_put(layers_node);
> >  			goto error;
> > +		}
> >  
> >  		of_node_put(layer_node);
> >  	}
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Paul Kocialkowski, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com



-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-06-24 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 11:21 [PATCH -next] drm/logicvc: add missing of_node_put() in logicvc_layers_init() Yang Yingliang
2022-06-14 11:21 ` Yang Yingliang
2022-06-24 14:36 ` Paul Kocialkowski
2022-06-24 14:36   ` Paul Kocialkowski
2022-06-24 15:25   ` Paul Kocialkowski [this message]
2022-06-24 15:25     ` Paul Kocialkowski

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=YrXXfhu5oPrBMPfu@aptenodytes \
    --to=paul.kocialkowski@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=yangyingliang@huawei.com \
    /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.