Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d9885a8 authored by Jasper Spaans's avatar Jasper Spaans Committed by Linus Torvalds
Browse files

[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: default avatarJasper Spaans <jasper@vs19.net>
Acked-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 33bc227e
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -453,12 +453,16 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
	/* Return if no suitable logo was found */
	/* Return if no suitable logo was found */
	fb_logo.logo = fb_find_logo(depth);
	fb_logo.logo = fb_find_logo(depth);


	if (!fb_logo.logo) {
		return 0;
	}
	
	if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
	if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
		yres = info->var.yres;
		yres = info->var.yres;
	else
	else
		yres = info->var.xres;
		yres = info->var.xres;


	if (fb_logo.logo && fb_logo.logo->height > yres) {
	if (fb_logo.logo->height > yres) {
		fb_logo.logo = NULL;
		fb_logo.logo = NULL;
		return 0;
		return 0;
	}
	}