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