From 640cde65b48ae6c773f00cbbdece7e67945b3f34 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 3 Apr 2019 07:44:07 +0100 Subject: [PATCH] drm/i915: Fix uninitialized mask in intel_device_info_subplatform_init MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Mask need to be initialized to zero since device id checks may not match. Signed-off-by: Tvrtko Ursulin Reported-by: Dan Carpenter Fixes: 805446c8347c ("drm/i915: Introduce concept of a sub-platform") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Jani Nikula Cc: Lucas De Marchi Cc: Jose Souza Cc: Ville Syrjälä Cc: Paulo Zanoni Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Dan Carpenter Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190403064407.25646-1-tvrtko.ursulin@linux.intel.com --- drivers/gpu/drm/i915/intel_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 0ed49d032c00..6af480b95bc6 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -778,7 +778,7 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) const unsigned int pi = __platform_mask_index(rinfo, info->platform); const unsigned int pb = __platform_mask_bit(rinfo, info->platform); u16 devid = INTEL_DEVID(i915); - u32 mask; + u32 mask = 0; /* Make sure IS_ checks are working. */ RUNTIME_INFO(i915)->platform_mask[pi] = BIT(pb); -- 2.30.2