[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200820052600.3069895-1-furquan@google.com>
Date: Wed, 19 Aug 2020 22:26:00 -0700
From: Furquan Shaikh <furquan@...gle.com>
To: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>
Cc: "Christian König" <christian.koenig@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
Stylon Wang <stylon.wang@....com>, Roman Li <roman.li@....com>,
Mikita Lipski <mikita.lipski@....com>,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, adurbin@...gle.com,
deepak.sharma@....com, Furquan Shaikh <furquan@...gle.com>
Subject: [PATCH] drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object
to 0 in amdgpu_dm_update_backlight_caps
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.
Signed-off-by: Furquan Shaikh <furquan@...gle.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 e4b33c67b634..725d8af634ee 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2853,7 +2853,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm)
{
#if defined(CONFIG_ACPI)
- struct amdgpu_dm_backlight_caps caps;
+ struct amdgpu_dm_backlight_caps caps = { 0 };
if (dm->backlight_caps.caps_valid)
return;
--
2.28.0.297.g1956fa8f8d-goog
Powered by blists - more mailing lists