drm/i915: fix uninitialized variable warning in i915_setup_compression()
authorPrarit Bhargava <prarit@redhat.com>
Thu, 27 May 2010 17:37:56 +0000 (13:37 -0400)
committerEric Anholt <eric@anholt.net>
Thu, 1 Jul 2010 22:57:51 +0000 (15:57 -0700)
Fixes:

drivers/gpu/drm/i915/i915_dma.c: In function ‘i915_setup_compression’:
drivers/gpu/drm/i915/i915_dma.c:1311: error: ‘compressed_llb’ may be used uninitialized in this function

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c

index 19677ecfe2bf86ce71fcb4b8d9af855f0424c99b..e50ae3c6cb6e437adbfdb8239b7048cfba211a59 100644 (file)
@@ -1231,7 +1231,7 @@ static void i915_warn_stolen(struct drm_device *dev)
 static void i915_setup_compression(struct drm_device *dev, int size)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 static void i915_setup_compression(struct drm_device *dev, int size)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
-       struct drm_mm_node *compressed_fb, *compressed_llb;
+       struct drm_mm_node *compressed_fb, *uninitialized_var(compressed_llb);
        unsigned long cfb_base;
        unsigned long ll_base = 0;
 
        unsigned long cfb_base;
        unsigned long ll_base = 0;