summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-04-27 07:06:22 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-27 07:06:21 -0700
commit42306cb9b7f440f2622ecae8b62200d10aa5188e (patch)
tree351397365ade1f539d5ef823b4a0dc6b556ebe6c
parent7d78f564ebe64a5c1977e6debbe25cd06bcd5902 (diff)
parentfa8bab306c8dd3276085df911844c9ffc649d035 (diff)
Merge "msm: mdss: Add check to avoid NULL pointer dereference"
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
index 2968d883c8cb..1f29a9f86e24 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
@@ -6085,8 +6085,9 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
/* update backlight in commit */
if (mdss_mdp_handle_backlight_extn(ctl)) {
- if (!IS_CALIB_MODE_BL(ctl->mfd) && (!ctl->mfd->ext_bl_ctrl ||
- !ctl->mfd->bl_level)) {
+ if (ctl->mfd && !IS_CALIB_MODE_BL(ctl->mfd) &&
+ (!ctl->mfd->ext_bl_ctrl ||
+ !ctl->mfd->bl_level)) {
mutex_lock(&ctl->mfd->bl_lock);
mdss_fb_set_backlight(ctl->mfd,
ctl->mfd->bl_extn_level);