All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Wambui Karuga <wambui.karugax@gmail.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Remove useless but deadly local
Date: Thu, 26 Mar 2020 10:43:12 +0200	[thread overview]
Message-ID: <87d08zik0v.fsf@intel.com> (raw)
In-Reply-To: <20200326082838.16357-1-chris@chris-wilson.co.uk>

On Thu, 26 Mar 2020, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Beware dereferencing the NULL pointer prior to checking for its
> existence.

Huh, I don't see the failure mode. Please enlighten me.

BR,
Jani.

>
> Fixes: 419190429cd1 ("drm/i915/hdmi: use struct drm_device based logging")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Wambui Karuga <wambui.karugax@gmail.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 395dc192baa0..0076abc63851 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -691,7 +691,6 @@ void intel_read_infoframe(struct intel_encoder *encoder,
>  			  union hdmi_infoframe *frame)
>  {
>  	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
> -	struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
>  	u8 buffer[VIDEO_DIP_DATA_SIZE];
>  	int ret;
>  
> @@ -708,13 +707,13 @@ void intel_read_infoframe(struct intel_encoder *encoder,
>  	/* see comment above for the reason for this offset */
>  	ret = hdmi_infoframe_unpack(frame, buffer + 1, sizeof(buffer) - 1);
>  	if (ret) {
> -		drm_dbg_kms(&i915->drm,
> +		drm_dbg_kms(encoder->base.dev,
>  			    "Failed to unpack infoframe type 0x%02x\n", type);
>  		return;
>  	}
>  
>  	if (frame->any.type != type)
> -		drm_dbg_kms(&i915->drm,
> +		drm_dbg_kms(encoder->base.dev,
>  			    "Found the wrong infoframe type 0x%x (expected 0x%02x)\n",
>  			    frame->any.type, type);
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-26  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  8:28 [Intel-gfx] [PATCH] drm/i915/display: Remove useless but deadly local Chris Wilson
2020-03-26  8:43 ` Jani Nikula [this message]
2020-03-26  9:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-03-26 10:03 ` [Intel-gfx] [PATCH] " Jani Nikula
2020-03-26 10:39 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

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=87d08zik0v.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=wambui.karugax@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 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.