diff options
author | Sachin Bhayare <sachin.bhayare@codeaurora.org> | 2017-03-23 16:30:37 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-04 22:00:59 -0700 |
commit | fa8bab306c8dd3276085df911844c9ffc649d035 (patch) | |
tree | 8e59d7b76f8f836f7e0b566f5d431b11b45813b5 | |
parent | 28e87e960f926d8d90a8e2edb3cc225c9c575bb6 (diff) |
msm: mdss: Add check to avoid NULL pointer dereference
Add mfd NULL check to avoid NULL pointer dereference.
Change-Id: I42ec3c73170765a008b9cae6f40a587afc818164
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
-rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 5 |
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 49348e5e16a9..86e61d6a5de5 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -6056,8 +6056,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); |