[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>
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;