Commit eb236fb9 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher
Browse files

drm/amd/display: Check NULL before calling dac_load_detection



dac_load_detection can be NULL in some scenario, so checking it before
calling.

Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarChenyu Chen <chen-yu.chen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 17917613)
parent 0de604d0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -932,7 +932,7 @@ static bool link_detect_dac_load_detect(struct dc_link *link)
	struct link_encoder *link_enc = link->link_enc;
	enum engine_id engine_id = link_enc->preferred_engine;
	enum dal_device_type device_type = DEVICE_TYPE_CRT;
	enum bp_result bp_result;
	enum bp_result bp_result = BP_RESULT_UNSUPPORTED;
	uint32_t enum_id;

	switch (engine_id) {
@@ -946,7 +946,9 @@ static bool link_detect_dac_load_detect(struct dc_link *link)
		break;
	}

	if (bios->funcs->dac_load_detection)
		bp_result = bios->funcs->dac_load_detection(bios, engine_id, device_type, enum_id);

	return bp_result == BP_RESULT_OK;
}