All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Skip pixel multiplier x-check if we fail to send the command
@ 2013-07-11 18:46 Damien Lespiau
  2013-07-11 19:52 ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Damien Lespiau @ 2013-07-11 18:46 UTC (permalink / raw)
  To: intel-gfx

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;
+
 	switch (val) {
 	case SDVO_CLOCK_RATE_MULT_1X:
 		encoder_pixel_multiplier = 1;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-12 15:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.