]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amd/display: Fix potential null-deref in dm_resume
authorRoman Li <roman.li@amd.com>
Thu, 1 Dec 2022 14:06:42 +0000 (09:06 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:11 +0000 (16:47 +0100)
commit6d49b52b63abae7c5e81a25e435f824e6cdcdaea
treeb28431f37765cf7095324f6e017a06496570b76b
parentd11743a47413adf19c48dc1961b714da27f25215
drm/amd/display: Fix potential null-deref in dm_resume

BugLink: https://bugs.launchpad.net/bugs/2011425
[ Upstream commit 7a7175a2cd84b7874bebbf8e59f134557a34161b ]

[Why]
Fixing smatch error:
dm_resume() error: we previously assumed 'aconnector->dc_link' could be null

[How]
Check if dc_link null at the beginning of the loop,
so further checks can be dropped.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c