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

Commit 864a91c8 authored by Carl Vanderlip's avatar Carl Vanderlip
Browse files

msm: mdss: Prevent AD on out of range displays



Prevent array out of bounds error when displays fall out of range for AD
support.

Change-Id: Iffebee5ed78bf256c8dd7c6f62587ac27cb2241e
Signed-off-by: default avatarCarl Vanderlip <carlv@codeaurora.org>
parent bcb87d5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1436,7 +1436,7 @@ static int pp_dspp_setup(u32 disp_num, struct mdss_mdp_mixer *mixer)
		flags = 0;
		flags = 0;


	mixer_cnt = mdss_mdp_get_ctl_mixers(disp_num, mixer_id);
	mixer_cnt = mdss_mdp_get_ctl_mixers(disp_num, mixer_id);
	if (dspp_num < mdata->nad_cfgs &&
	if (dspp_num < mdata->nad_cfgs && disp_num < mdata->nad_cfgs &&
				(mixer_cnt <= mdata->nmax_concurrent_ad_hw)) {
				(mixer_cnt <= mdata->nmax_concurrent_ad_hw)) {
		ad = &mdata->ad_cfgs[disp_num];
		ad = &mdata->ad_cfgs[disp_num];
		ad_flags = ad->reg_sts;
		ad_flags = ad->reg_sts;