mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: check null pointer before reading backlight on status
Since msm_fb_blank_sub() can be called from hdmi which has no backlight, we should check the null pointer before to run the get_backlight_on_status(). Change-Id: I9a91dc337b56e20fbfd82347cf429350f1a72b37
This commit is contained in:
parent
fba6280818
commit
a87d0e534a
1 changed files with 9 additions and 6 deletions
|
@ -905,13 +905,16 @@ static int msm_fb_blank_sub(int blank_mode, struct fb_info *info,
|
|||
|
||||
mfd->op_enable = FALSE;
|
||||
curr_pwr_state = mfd->panel_power_on;
|
||||
while (pdata->get_backlight_on_status() && time_out) {
|
||||
if (pdata->get_backlight_on_status) {
|
||||
while (pdata->get_backlight_on_status()
|
||||
&& time_out) {
|
||||
msleep(1);
|
||||
time_out --;
|
||||
}
|
||||
if (time_out == 0)
|
||||
pr_err("%s : timeout for waiting backlight turn on\n", __func__);
|
||||
|
||||
pr_err("%s : timeout for waiting backlight turn on\n",
|
||||
__func__);
|
||||
}
|
||||
/* clean fb to prevent displaying old fb */
|
||||
memset((void *)info->screen_base, 0,
|
||||
info->fix.smem_len);
|
||||
|
|
Loading…
Reference in a new issue