diff options
author | Sandor Yu <R01008@freescale.com> | 2014-07-17 20:41:14 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-04-14 14:01:00 -0500 |
commit | 355ed627d742b19084c6645941c6be42f365918f (patch) | |
tree | ce1a60bd0e3b813d9ae6b6183fe0dee7c464186b | |
parent | b7d46252d6d65b0c00b3f859ae5fb827ff8c6683 (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>
(cherry picked from commit 3bea30ff471c8fc1e546be26a8625e6aa425d5aa)
(cherry picked from commit ddfd6b989071e38955855351556f518b1600944d)
-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 4e39291ac8b4..c34fb835809d 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -3180,6 +3180,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); |