summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2014-07-17 20:41:14 +0800
committerSandor Yu <R01008@freescale.com>2014-07-17 21:19:37 +0800
commit3bea30ff471c8fc1e546be26a8625e6aa425d5aa (patch)
tree44dc215b54059e65e117ed5493fe99b61d43fc7b
parent5687cb8dc5099acdb0e3a0542f666326764d558c (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>
-rw-r--r--drivers/video/console/fbcon.c2
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)
if (!fb_display[i].mode)
continue;
vc = vc_cons[i].d;
+ if (!vc)
+ continue;
display_to_var(&var, &fb_display[i]);
mode = fb_find_nearest_mode(fb_display[i].mode,
&info->modelist);