drivers/intel/gma: Uninitialized var before if condition

The variable 'wait' is used uninitialized whenever 'if' condition is false
                if (val & DDI_BUF_CTL_ENABLE) {
                    ^~~~~~~~~~~~~~~~~~~~~~~~

Leading to an uninitialized use occurs here:
                if (wait)
                    ^~~~

Change-Id: I7d96bf1e33b9c4312d4a0ba8276e83d17d6cd070
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6052
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Edward O'Callaghan 2014-06-17 15:04:36 +10:00 committed by Patrick Georgi
parent 502c3db939
commit b0cbb2cd17
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ static void intel_wait_ddi_buf_idle(int port)
void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp, int port) void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp, int port)
{ {
int wait; int wait = 0;
uint32_t val; uint32_t val;
if (io_i915_read32(DP_TP_CTL(port)) & DP_TP_CTL_ENABLE) { if (io_i915_read32(DP_TP_CTL(port)) & DP_TP_CTL_ENABLE) {