public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH RESEND 2/3] drm/i915: check for return value
Date: Wed, 9 Dec 2015 14:33:28 +0100	[thread overview]
Message-ID: <20151209133328.GP20822@phenom.ffwll.local> (raw)
In-Reply-To: <20151209113912.GA24852@sudip-pc>

On Wed, Dec 09, 2015 at 05:09:12PM +0530, Sudip Mukherjee wrote:
> On Thu, Oct 08, 2015 at 04:29:31PM +0200, Daniel Vetter wrote:
> > On Thu, Oct 08, 2015 at 07:28:00PM +0530, Sudip Mukherjee wrote:
> > > We were not checking the return value of drm_encoder_init() which can
> > > fail. And if it fails then we will be working with an uninitialized
> > > encoder.
> > > 
> > > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > 
> > Queued for -next, thanks for the patch.
> > -Daniel
> 
> Hi Daniel,
> It is still not there in linux-next. Still applies cleanly on
> next-20151209.

Sorry, this must have fallen through the cracks somehow. Applied now for
real.

Thanks, Daniel

> 
> regards
> sudip
> 
> > 
> > > ---
> > > 
> > > Sent on 27/07/2015
> > > 
> > >  drivers/gpu/drm/i915/intel_dp.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > > index 18bcfbe..2a8b47e 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -6174,8 +6174,9 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
> > >  	intel_encoder = &intel_dig_port->base;
> > >  	encoder = &intel_encoder->base;
> > >  
> > > -	drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
> > > -			 DRM_MODE_ENCODER_TMDS);
> > > +	if (drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
> > > +			     DRM_MODE_ENCODER_TMDS))
> > > +		goto err_encoder_init;
> > >  
> > >  	intel_encoder->compute_config = intel_dp_compute_config;
> > >  	intel_encoder->disable = intel_disable_dp;
> > > @@ -6224,6 +6225,7 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
> > >  
> > >  err_init_connector:
> > >  	drm_encoder_cleanup(encoder);
> > > +err_encoder_init:
> > >  	kfree(intel_connector);
> > >  err_connector_alloc:
> > >  	kfree(intel_dig_port);
> > > -- 
> > > 1.9.1
> > > 
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-09 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 13:57 [PATCH RESEND 1/3] drm/i915: use error path Sudip Mukherjee
2015-10-08 13:58 ` [PATCH RESEND 2/3] drm/i915: check for return value Sudip Mukherjee
2015-10-08 14:29   ` Daniel Vetter
2015-12-09 11:39     ` Sudip Mukherjee
2015-12-09 13:33       ` Daniel Vetter [this message]
2015-10-08 14:30 ` [PATCH RESEND 1/3] drm/i915: use error path Daniel Vetter

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=20151209133328.GP20822@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox