mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
drm/amd/display: sink EDID data null check
[Why] When sink EDID data pointer is NULL, it will cause an unexpected error. [How] Check data pointer is not NULL first. Reviewed-by: Yihan Zhu <yihan.zhu@amd.com> Signed-off-by: Richard Chiang <Richard.Chiang@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9862d2ac66
commit
a8936060a0
|
|
@ -623,6 +623,9 @@ static bool detect_dp(struct dc_link *link,
|
|||
|
||||
static bool is_same_edid(struct dc_edid *old_edid, struct dc_edid *new_edid)
|
||||
{
|
||||
if (old_edid == NULL || new_edid == NULL)
|
||||
return false;
|
||||
|
||||
if (old_edid->length != new_edid->length)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user