提交 6d9885a8 编写于 作者: J Jasper Spaans 提交者: Linus Torvalds

[PATCH] fbcon: fix obvious bug in fbcon logo rotation code

This code fixes a tiny problem with the recent fbcon rotation changes:
fb_prepare_logo doesn't check the return value of fb_find_logo and that
causes a crash for my while booting.

Obvious & working & tested fix is here.
Signed-off-by: NJasper Spaans <jasper@vs19.net>
Acked-by: NAntonino Daplas <adaplas@pol.net>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 33bc227e
......@@ -452,13 +452,17 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
/* Return if no suitable logo was found */
fb_logo.logo = fb_find_logo(depth);
if (!fb_logo.logo) {
return 0;
}
if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
yres = info->var.yres;
else
yres = info->var.xres;
if (fb_logo.logo && fb_logo.logo->height > yres) {
if (fb_logo.logo->height > yres) {
fb_logo.logo = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册