linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chrisanthus, Anitha" <anitha.chrisanthus@intel.com>
To: jing yangyang <cgel.zte@gmail.com>
Cc: "Dea, Edmund J" <edmund.j.dea@intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	jing yangyang <jing.yangyang@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: RE: [PATCH linux-next] : add put_device() after of_find_device_by_node()
Date: Thu, 26 Aug 2021 18:39:07 +0000	[thread overview]
Message-ID: <BY5PR11MB4182FDE1DD886B6DD59915B98CC79@BY5PR11MB4182.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BY5PR11MB4182B03BCF3FE98A5B0054D78CC49@BY5PR11MB4182.namprd11.prod.outlook.com>

Hi Jing,

> -----Original Message-----
> From: Chrisanthus, Anitha
> Sent: Monday, August 23, 2021 4:25 PM
> To: jing yangyang <cgel.zte@gmail.com>
> Cc: Dea, Edmund J <edmund.j.dea@intel.com>; David Airlie <airlied@linux.ie>;
> Daniel Vetter <daniel@ffwll.ch>; dri-devel@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; jing yangyang <jing.yangyang@zte.com.cn>; Zeal
> Robot <zealci@zte.com.cn>
> Subject: RE: [PATCH linux-next] : add put_device() after
> of_find_device_by_node()
> 
Thanks for the patch. Please add drm/kmb: to the subject line and also correct the checkpatch warning.
With that ab.

> Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> 
> > -----Original Message-----
> > From: jing yangyang <cgel.zte@gmail.com>
> > Sent: Thursday, August 19, 2021 7:10 PM
> > To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>
> > Cc: Dea, Edmund J <edmund.j.dea@intel.com>; David Airlie
> <airlied@linux.ie>;
> > Daniel Vetter <daniel@ffwll.ch>; dri-devel@lists.freedesktop.org; linux-
> > kernel@vger.kernel.org; jing yangyang <jing.yangyang@zte.com.cn>; Zeal
> > Robot <zealci@zte.com.cn>
> > Subject: [PATCH linux-next] : add put_device() after
> of_find_device_by_node()
> >
> > This was found by coccicheck:
> > ./drivers/gpu/drm/kmb/kmb_drv.c:503:2-8:
> > ERROR  missing put_device; call of_find_device_by_node on line 490,
> > but without a corresponding object release within this function.
> >
> > Reported-by: Zeal Robot <zealci@zte.com.cn>
> > Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
> > ---
> >  drivers/gpu/drm/kmb/kmb_drv.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
> > b/drivers/gpu/drm/kmb/kmb_drv.c
> > index f54392e..58495a9 100644
> > --- a/drivers/gpu/drm/kmb/kmb_drv.c
> > +++ b/drivers/gpu/drm/kmb/kmb_drv.c
> > @@ -500,8 +500,10 @@ static int kmb_probe(struct platform_device *pdev)
> >  	ret = kmb_dsi_host_bridge_init(get_device(&dsi_pdev->dev));
> >
> >  	if (ret == -EPROBE_DEFER) {
> > +		put_device(&dsi_pdev->dev);
> >  		return -EPROBE_DEFER;
> >  	} else if (ret) {
> > +		put_device(&dsi_pdev->dev);
> >  		DRM_ERROR("probe failed to initialize DSI host bridge\n");
> >  		return ret;
> >  	}
> > @@ -509,9 +511,10 @@ static int kmb_probe(struct platform_device *pdev)
> >  	/* Create DRM device */
> >  	kmb = devm_drm_dev_alloc(dev, &kmb_driver,
> >  				 struct kmb_drm_private, drm);
> > -	if (IS_ERR(kmb))
> > +	if (IS_ERR(kmb)) {
> > +		put_device(&dsi_pdev->dev);
> >  		return PTR_ERR(kmb);
> > -
> > +	}
> >  	dev_set_drvdata(dev, &kmb->drm);
> >
> >  	/* Initialize MIPI DSI */
> > --
> > 1.8.3.1
> >


      reply	other threads:[~2021-08-26 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20  2:10 [PATCH linux-next] : add put_device() after of_find_device_by_node() jing yangyang
2021-08-23 23:24 ` Chrisanthus, Anitha
2021-08-26 18:39   ` Chrisanthus, Anitha [this message]

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=BY5PR11MB4182FDE1DD886B6DD59915B98CC79@BY5PR11MB4182.namprd11.prod.outlook.com \
    --to=anitha.chrisanthus@intel.com \
    --cc=airlied@linux.ie \
    --cc=cgel.zte@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edmund.j.dea@intel.com \
    --cc=jing.yangyang@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zealci@zte.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).