Skip to content

Commit

Permalink
[PATCH] fbcon: fix obvious bug in fbcon logo rotation code
Browse files Browse the repository at this point in the history
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: Jasper Spaans <[email protected]>
Acked-by: Antonino Daplas <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jasper Spaans authored and Linus Torvalds committed Nov 25, 2005
1 parent 33bc227 commit 6d9885a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d9885a

Please sign in to comment.