Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1052456pxk; Mon, 31 Aug 2020 08:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4CZS2y8nSyggqnRreUvPUU75R4ss75eIGYrHDHCIVTRp3bDEVD42ZaLS+HRnYCOKZnVJ5 X-Received: by 2002:a50:d9c1:: with SMTP id x1mr1771839edj.283.1598887936284; Mon, 31 Aug 2020 08:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598887936; cv=none; d=google.com; s=arc-20160816; b=gpRl+qloOJ4RpcUGxELTprU+Mx6Krb34hqePvAF9/W6+jArXjtHzaIA3GxZdLc33LI Nes9En3Ap12yQfK4BipuLhziP2O4nBa7zAbkuoxkk3ZmQwNPVq1EFXRjl3xYZHK1UJsO +vmbch3iakyvRAsG7JJHQZWKX1k49CTyQU7ekY7yIjO7SWZIuL+hZCDe0Zr4U96keMDz H+ZX3stYsRe1x3SCTco82Ae4QENNBKgA4CnGYBGatddVB6snZHZ+NEB+hYHtC2MQpuFH vBM1uzeTbswHtkGNw21KVxPQoHYAXQrFOfrDu9rjryXK8+babql2hsLgzeqABKA5tn2K 5TZw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pMf1SkNLgliConANyUpJ1xkQml5RFrEJvRrFtbxz59w=; b=vtnhWzIniqqinU+5BkzkJ/xyTlg7UZM+So6MkyheKYadzbiKnHOlzVDEKm97OPwUs5 a8g/fAOO6nf40WWmpHu4dvtX1L6KczjhYktM/7Jg1NQdLs1F6PAcifWPnlmg2M0rYI/R lu88UPvHmNzxN4j3/JDWB9Cd6HMt4nzYKuNDe7CjnMFxRVK8S1Qp0UNk14HE3FXXbsG8 GWYdH3iCi5ipWiFRN1w/q6n7/KEdU2kw5doBRxB0w32m/q/G8+mWuTk/dXIKunkRQ4mk ETRl1IVWGg7hpagNAM5xNQZLjqyXrldRT6uY9TgQz5WGZGCJr3iMqjQ6GKvDeLFTMFH2 ePJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IIcRWYKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si5312476eds.6.2020.08.31.08.31.53; Mon, 31 Aug 2020 08:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IIcRWYKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728715AbgHaPao (ORCPT + 99 others); Mon, 31 Aug 2020 11:30:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:39890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728638AbgHaPa1 (ORCPT ); Mon, 31 Aug 2020 11:30:27 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9AEE3214D8; Mon, 31 Aug 2020 15:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887827; bh=J6LyLE97LKjW1LwdUlkXO5WQuh0pOgwW+p/41/a3jWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IIcRWYKryZFefF836oUBu2zazDLwtRwOtFowIfcoj+KeNZFAHfrrg+p6xzSbqUWSD LmpNY8JfFxZgrNqj54y2JtWEydnWkmMg9fi6N6PFSNU8VSykVGUJjTSfv/IMogUvV+ 18o9yleRNPe1Dl30NjGrFrxOmxGYRJ09Y+aaLGBQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Furquan Shaikh , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.8 35/42] drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps Date: Mon, 31 Aug 2020 11:29:27 -0400 Message-Id: <20200831152934.1023912-35-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Furquan Shaikh [ Upstream commit 5896585512e5156482335e902f7c7393b940da51 ] In `amdgpu_dm_update_backlight_caps()`, there is a local `amdgpu_dm_backlight_caps` object that is filled in by `amdgpu_acpi_get_backlight_caps()`. However, this object is uninitialized before the call and hence the subsequent check for aux_support can fail since it is not initialized by `amdgpu_acpi_get_backlight_caps()` as well. This change initializes this local `amdgpu_dm_backlight_caps` object to 0. Reviewed-by: Christian König Signed-off-by: Furquan Shaikh Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0a39a8558b294..0682fd363cb50 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2844,6 +2844,8 @@ static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm) #if defined(CONFIG_ACPI) struct amdgpu_dm_backlight_caps caps; + memset(&caps, 0, sizeof(caps)); + if (dm->backlight_caps.caps_valid) return; -- 2.25.1