diff mbox

[2/6] drm/i915: Initialize wait in intel_ddi_prepare_link_retrain()

Message ID 1362670228-19494-2-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien March 7, 2013, 3:30 p.m. UTC
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@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Ben Widawsky March 8, 2013, 9:03 p.m. UTC | #1
On Thu, Mar 07, 2013 at 03:30:24PM +0000, Damien Lespiau wrote:
> 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@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

[snip]
diff mbox

Patch

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) {