Commit 7e60e389 authored by Michael Strauss's avatar Michael Strauss Committed by Alex Deucher
Browse files

drm/amd/display: Add null pointer check to is_dig_enabled func



[WHY]
Safeguarding as pointer may be null in diagnostic environment

Signed-off-by: default avatarMichael Strauss <michael.strauss@amd.com>
Reviewed-by: default avatarSung Lee <Sung.Lee@amd.com>
Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 91501d0a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@ int vg_get_active_display_cnt_wa(
		const struct dc_link *link = dc->links[i];

		/* abusing the fact that the dig and phy are coupled to see if the phy is enabled */
		if (link->link_enc->funcs->is_dig_enabled(link->link_enc))
		if (link->link_enc->funcs->is_dig_enabled &&
				link->link_enc->funcs->is_dig_enabled(link->link_enc))
			display_count++;
	}