From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip pixel multiplier x-check if we fail to send the command
Date: Thu, 11 Jul 2013 21:52:33 +0200 [thread overview]
Message-ID: <20130711195233.GX6143@phenom.ffwll.local> (raw)
In-Reply-To: <1373568360-12566-1-git-send-email-damien.lespiau@intel.com>
On Thu, Jul 11, 2013 at 07:46:00PM +0100, Damien Lespiau wrote:
> If intel_sdvo_get_value() fails here, val is unitialized and the cross
> check won't check anything.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> drivers/gpu/drm/i915/intel_sdvo.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index b8e1623..4481f6a 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1357,7 +1357,10 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder,
> }
>
> /* Cross check the port pixel multiplier with the sdvo encoder state. */
> - intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT, &val, 1);
> + if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT,
> + &val, 1))
> + return;
But now it fails silently instead of being paranoid ... Can we just shut
up the tool instead?
-Daniel
> +
> switch (val) {
> case SDVO_CLOCK_RATE_MULT_1X:
> encoder_pixel_multiplier = 1;
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-07-11 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 18:46 [PATCH] drm/i915: Skip pixel multiplier x-check if we fail to send the command Damien Lespiau
2013-07-11 19:52 ` Daniel Vetter [this message]
2013-07-11 20:35 ` Damien Lespiau
2013-07-12 12:11 ` Daniel Vetter
2013-07-12 15:24 ` [PATCH 1/2] drm/i915: Don't attempt to read an unitialized stack value Damien Lespiau
2013-07-12 15:33 ` 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=20130711195233.GX6143@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox