fbcon: fix obvious bug in fbcon logo rotation code
PATCH 1/1 fbcon: fix obvious bug in fbcon logo rotation code
From: Jasper Spaans <[email protected]>
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]>
---
drivers/video/fbmem.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
applies-to: 109d99a52b1533358445233dd16a5dfadcb618ce d506fa9f5957183d7e05576620bc7470b1bc1b67
drivers/video/fbmem.c +5 -1
@@ -451,13 +451,17 @@ int fb_prepare_logo(struct fb_info *info/* 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 ; }
---
0.99.9.GIT
Signature · 4 lines
Jasper Spaans http://jsp.vs19.net/
16:52:44 up 10508 days, 8:39, 0 users, load average: 5.10 4.67 5.21
emacs... car rater vi, c'est un droit inaliénableQuoted 9 lines · Jasper Spaans
From: Jasper Spaans <[email protected]>
This code fixes a tiny problem with the recent fbcon rotation changes:
fb_prepare_logodoesn't check the return value offb_find_logoand 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]>