[Intel-gfx] [PATCH 2/6] drm/i915: Initialize wait in intel_ddi_prepare_link_retrain()

Damien Lespiau damien.lespiau at intel.com
Thu Mar 7 16:30:24 CET 2013


We weren't initializing wait, which could lead to the use of a random
value from the stack in the "if (wait)" condition.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 3b5838d..a1505e3 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1398,7 +1398,7 @@ void intel_ddi_prepare_link_retrain(struct drm_encoder *encoder)
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
 	struct drm_i915_private *dev_priv = encoder->dev->dev_private;
 	enum port port = intel_dig_port->port;
-	bool wait;
+	bool wait = false;
 	uint32_t val;
 
 	if (I915_READ(DP_TP_CTL(port)) & DP_TP_CTL_ENABLE) {
-- 
1.7.7.5




More information about the Intel-gfx mailing list