Commit 3e1974cf authored by Jake Wang's avatar Jake Wang Committed by Alex Deucher

drm/amd/display: Added local_sink null check before access

[Why & How]
Need to check if local_sink is NULL before accessing.
Signed-off-by: default avatarJake Wang <haonan.wang2@amd.com>
Reviewed-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8c44515b
......@@ -167,7 +167,8 @@ bool edp_receiver_ready_T9(struct dc_link *link)
} while (++tries < 50);
}
if (link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off > 0)
if (link->local_sink &&
link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off > 0)
udelay(link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off * 1000);
return result;
......@@ -201,7 +202,8 @@ bool edp_receiver_ready_T7(struct dc_link *link)
} while (time_taken_in_ns < 50 * 1000000); //MAx T7 is 50ms
}
if (link->local_sink->edid_caps.panel_patch.extra_t7_ms > 0)
if (link->local_sink &&
link->local_sink->edid_caps.panel_patch.extra_t7_ms > 0)
udelay(link->local_sink->edid_caps.panel_patch.extra_t7_ms * 1000);
return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment