Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6432856ybi; Wed, 29 May 2019 07:46:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlIh8xx4MnZnt7GGi3h31rWUz8p7L0tXJ+Htspz7gan+o5iLJdVogxFOAztz5gCk0gmTyz X-Received: by 2002:a17:902:b201:: with SMTP id t1mr40537007plr.328.1559141170746; Wed, 29 May 2019 07:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559141170; cv=none; d=google.com; s=arc-20160816; b=mOi9IBrWQbjKhP8EzAHbOhLblWyUt8QdBIDhakJFNHPHb1w+bb+BjxVjC2Qss0rGsU e2bIGtnnsKlgRxnFuKzyfhr/nZKtDDiq9VQTYLyTWuMx96YQJClcErwdAStfI4pn1P4Z pedqf8RCE/R/00lnBbgwiCfwCgv0OLHv4QTeU4AZmsnJgNh9aBKv3Q69XNmMZHjLHVYF 7dZ51G2lmq/Q1RgfZP+oWIBbO8FU97sw2IgATECJR15y/f8CvOmq40MgHr/Vi+kMaeHZ fUe35HGoeUwdz39hS99inDf42iykkAFkl8Snf6JGl090UOD62fIJhp5D311/+QpGLBcM bvCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=v2/L/CUI5SjTy7oGHVwIPylrGCTiSeLJrPXbKBcpMwI=; b=wk34xHx2eePGm8N+qm709ccMmGKAvilGXr5eoUemm9KUi5JyicwjJdva0ldG7QDrAO xRaSMYUx7fBvnlP00XUg4DgN250wFxPFHaYmU4nN9AuU1HO3o1D7LFt1c5mQ7+3wFDFw cHI9E6329SJYI16QgynjcGkQNfIqy24tM9/SG1FFyKBFhQc+3EZv/NJBK/aVrNbhoQ/L Yaocm2TNiG3iVnwpn+muzpW9G9t2hPj6IMp+kCndBMb36U+2YOa9I9brwp5iS4E2+1wh YZNScgv00RVGloJukuFhQj1HK0dFGo3LBAYkxVOo7zoEzcFR1/QiqxMA1IGQ0TfKox8K iUiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si25735917pgg.188.2019.05.29.07.45.53; Wed, 29 May 2019 07:46:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbfE2Onb (ORCPT + 99 others); Wed, 29 May 2019 10:43:31 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48209 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfE2On3 (ORCPT ); Wed, 29 May 2019 10:43:29 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hVznZ-0002GG-Dy; Wed, 29 May 2019 14:43:25 +0000 From: Colin King To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/i915: fix uninitialized variable 'subslice_mask' Date: Wed, 29 May 2019 15:43:25 +0100 Message-Id: <20190529144325.17235-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently subslice_mask is not initialized and so data is being bit-wise or'd into a garbage value. Fix this by inintializing subslice_mask to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") Signed-off-by: Colin Ian King --- 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 3625f777f3a3..d395a09b994f 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -298,7 +298,7 @@ static void cherryview_sseu_info_init(struct drm_i915_private *dev_priv) { struct sseu_dev_info *sseu = &RUNTIME_INFO(dev_priv)->sseu; u32 fuse; - u8 subslice_mask; + u8 subslice_mask = 0; fuse = I915_READ(CHV_FUSE_GT); -- 2.20.1