diff options
author | Jasper Spaans <jasper@vs19.net> | 2005-11-24 10:53:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-24 21:40:34 -0500 |
commit | 6d9885a8ce45cd9b7d36517ee823a480eaf95c02 (patch) | |
tree | e2579aea1ad0c0896d95afd1a0cc28b9c21c97fb /drivers/video | |
parent | 33bc227e4e48ddadcf2eacb381c19df338f0a6c8 (diff) |
[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: Jasper Spaans <jasper@vs19.net>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbmem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 9f180096c896..6240aedb4154 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -452,13 +452,17 @@ int fb_prepare_logo(struct fb_info *info, int rotate) | |||
452 | 452 | ||
453 | /* Return if no suitable logo was found */ | 453 | /* Return if no suitable logo was found */ |
454 | fb_logo.logo = fb_find_logo(depth); | 454 | fb_logo.logo = fb_find_logo(depth); |
455 | |||
456 | if (!fb_logo.logo) { | ||
457 | return 0; | ||
458 | } | ||
455 | 459 | ||
456 | if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) | 460 | if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) |
457 | yres = info->var.yres; | 461 | yres = info->var.yres; |
458 | else | 462 | else |
459 | yres = info->var.xres; | 463 | yres = info->var.xres; |
460 | 464 | ||
461 | if (fb_logo.logo && fb_logo.logo->height > yres) { | 465 | if (fb_logo.logo->height > yres) { |
462 | fb_logo.logo = NULL; | 466 | fb_logo.logo = NULL; |
463 | return 0; | 467 | return 0; |
464 | } | 468 | } |