aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sdvo.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-06-10 08:49:25 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-06-10 14:17:41 -0400
commit2f28c50bb3881f11afee8f8c9041dad2c96653aa (patch)
tree58caee4f3124886996d4bcb5f13573216629e291 /drivers/gpu/drm/i915/intel_sdvo.c
parent19d415a25e9078dba26adb54396d4e5b30d3b572 (diff)
drm/i915: Initialize active_outputs to never read unitialized values
In case of intel_sdvo_get_active_outputs() failing, we end up reading a value from the stack. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index e77ffadb1779..97d3099aea23 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1277,7 +1277,7 @@ static bool intel_sdvo_connector_get_hw_state(struct intel_connector *connector)
1277 struct intel_sdvo_connector *intel_sdvo_connector = 1277 struct intel_sdvo_connector *intel_sdvo_connector =
1278 to_intel_sdvo_connector(&connector->base); 1278 to_intel_sdvo_connector(&connector->base);
1279 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base); 1279 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base);
1280 u16 active_outputs; 1280 u16 active_outputs = 0;
1281 1281
1282 intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); 1282 intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs);
1283 1283
@@ -1293,7 +1293,7 @@ static bool intel_sdvo_get_hw_state(struct intel_encoder *encoder,
1293 struct drm_device *dev = encoder->base.dev; 1293 struct drm_device *dev = encoder->base.dev;
1294 struct drm_i915_private *dev_priv = dev->dev_private; 1294 struct drm_i915_private *dev_priv = dev->dev_private;
1295 struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base); 1295 struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base);
1296 u16 active_outputs; 1296 u16 active_outputs = 0;
1297 u32 tmp; 1297 u32 tmp;
1298 1298
1299 tmp = I915_READ(intel_sdvo->sdvo_reg); 1299 tmp = I915_READ(intel_sdvo->sdvo_reg);