Unverified Commit 7b5c07ef authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13897 drm/amd/display: Check link_index before accessing dc->links[

parents dc37f02e e53b9b24
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@
#include "dce/dce_i2c.h"
struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
{
	if (link_index >= MAX_PIPES * 2 + 2)
		return NULL;

	return dc->links[link_index];
}