mdss: mdp: Add null check for ctl

Check if ctl is NULL and flag error.

Change-Id: I3a1a1d04ff1dab0aada06071498529b48222c465
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
This commit is contained in:
Animesh Kishore 2018-03-16 15:18:07 +05:30 committed by Gerrit - the friendly Code Review server
parent aa0ebdfe2d
commit d48974bb7a

View file

@ -738,6 +738,12 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event)
int rc = 0;
bool schedule_off = false;
if (!ctl) {
pr_err("%s invalid ctl\n", __func__);
rc = -EINVAL;
goto exit;
}
/* Get both controllers in the correct order for dual displays */
mdss_mdp_get_split_display_ctls(&ctl, &sctl);