Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb7b11e1 authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher
Browse files

drm/amd/display: Add NULL check for enabling dp ss



[Why]

The pointer for integrated_info can be NULL which causes the system to
do a null pointer deference and hang on boot.

[How]

Add a check to ensure that integrated_info is not null before enabling
DP ss.

Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarSun peng Li <Sunpeng.Li@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ad830e7a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1038,7 +1038,9 @@ static bool construct(
	link->link_index = init_params->link_index;

	link->link_id = bios->funcs->get_connector_id(bios, init_params->connector_index);
	link->dp_ss_off = !!dc_ctx->dc_bios->integrated_info->dp_ss_control;;

	if (dc_ctx->dc_bios->integrated_info)
		link->dp_ss_off = !!dc_ctx->dc_bios->integrated_info->dp_ss_control;

	if (link->link_id.type != OBJECT_TYPE_CONNECTOR) {
		dm_error("%s: Invalid Connector ObjectID from Adapter Service for connector index:%d! type %d expected %d\n",