drm/i915: Zero initialize mode_cmd
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 May 2012 18:08:56 +0000 (21:08 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 5 Jul 2012 11:27:58 +0000 (13:27 +0200)
Zero initialize the mode_cmd structure when creating the kernel
framebuffer. Avoids having uninitialized data in offsets[0] for
instance.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_fb.c

index e9f8338bd802f03d1c2d1ba0130ef089eb0384cc..97f673523b9754f69ebef2308e1ab92539cf29e3 100644 (file)
@@ -65,7 +65,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct fb_info *info;
        struct drm_framebuffer *fb;
-       struct drm_mode_fb_cmd2 mode_cmd;
+       struct drm_mode_fb_cmd2 mode_cmd = {};
        struct drm_i915_gem_object *obj;
        struct device *device = &dev->pdev->dev;
        int size, ret;