aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/fonts.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-07-31 03:37:36 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:37 -0400
commitc81f717cb9e0bd91dc4b98753cb2705ab0fe2801 (patch)
tree449fd751060c50355bf416fe0425c382a42ce047 /drivers/video/console/fonts.c
parentbb029c67e430e9ae96476ce7233468c11627c1db (diff)
fbcon: Fix typo and bogus logic in get_default_font
Reported in: Bugzilla Bug 8727 Fix typo and bogus logic in get_default_font(). The bug results in get_default_font() returning a font that may not be displayed properly by a framebuffer driver. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console/fonts.c')
-rw-r--r--drivers/video/console/fonts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c
index a6828d0a4c56..96979c377518 100644
--- a/drivers/video/console/fonts.c
+++ b/drivers/video/console/fonts.c
@@ -133,8 +133,8 @@ const struct font_desc *get_default_font(int xres, int yres, u32 font_w,
133 if ((yres < 400) == (f->height <= 8)) 133 if ((yres < 400) == (f->height <= 8))
134 c += 1000; 134 c += 1000;
135 135
136 if (!(font_w & (1 << (f->width - 1))) || 136 if ((font_w & (1 << (f->width - 1))) &&
137 !(font_w & (1 << (f->height - 1)))) 137 (font_h & (1 << (f->height - 1))))
138 c += 1000; 138 c += 1000;
139 139
140 if (c > cc) { 140 if (c > cc) {