Commit 0272f6c0 authored by Roman Li's avatar Roman Li Committed by sanglipeng
Browse files

drm/amd/display: Fix potential null-deref in dm_resume

stable inclusion
from stable-v5.10.173
commit 9f73793b81637c60ccc83cc508645310b8ab7d80
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9f73793b81637c60ccc83cc508645310b8ab7d80



--------------------------------

[ Upstream commit 7a7175a2 ]

[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: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: default avatarWayne Lin <Wayne.Lin@amd.com>
Acked-by: default avatarJasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: default avatarRoman Li <roman.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 6e7c2d2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment