[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>

authored by Jasper Spaans and committed by Linus Torvalds 6d9885a8 33bc227e

+5 -1
+5 -1
drivers/video/fbmem.c
··· 452 452 453 453 /* Return if no suitable logo was found */ 454 454 fb_logo.logo = fb_find_logo(depth); 455 + 456 + if (!fb_logo.logo) { 457 + return 0; 458 + } 455 459 456 460 if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) 457 461 yres = info->var.yres; 458 462 else 459 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 466 fb_logo.logo = NULL; 463 467 return 0; 464 468 }