diff options
author | Sandor Yu <R01008@freescale.com> | 2014-07-17 08:41:14 -0400 |
---|---|---|
committer | Sandor Yu <R01008@freescale.com> | 2014-07-17 09:19:37 -0400 |
commit | 3bea30ff471c8fc1e546be26a8625e6aa425d5aa (patch) | |
tree | 44dc215b54059e65e117ed5493fe99b61d43fc7b /drivers/video | |
parent | 5687cb8dc5099acdb0e3a0542f666326764d558c (diff) |
ENGR00321817-02 fbcon: System hang when calling fb_new_modelist()
System will hang if calling fb_new_modelist() function from mxc_hdmi
driver.
In the function of fbcon_new_modelist(), pointer variable vc is missing
null pointer check, add null pointer check vc to fix the issue.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/fbcon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index a92783e480e6..4a42cc56d4b2 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -3208,6 +3208,8 @@ static void fbcon_new_modelist(struct fb_info *info) | |||
3208 | if (!fb_display[i].mode) | 3208 | if (!fb_display[i].mode) |
3209 | continue; | 3209 | continue; |
3210 | vc = vc_cons[i].d; | 3210 | vc = vc_cons[i].d; |
3211 | if (!vc) | ||
3212 | continue; | ||
3211 | display_to_var(&var, &fb_display[i]); | 3213 | display_to_var(&var, &fb_display[i]); |
3212 | mode = fb_find_nearest_mode(fb_display[i].mode, | 3214 | mode = fb_find_nearest_mode(fb_display[i].mode, |
3213 | &info->modelist); | 3215 | &info->modelist); |