public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbcon: fix obvious bug in fbcon logo rotation code
@ 2005-11-24 15:53 Jasper Spaans
  2005-11-24 21:27 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Jasper Spaans @ 2005-11-24 15:53 UTC (permalink / raw)
  To: linux-kernel, Antonino Daplas, Andrew Morton, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

From: Jasper Spaans <jasper@vs19.net>

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

 drivers/video/fbmem.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

applies-to: 109d99a52b1533358445233dd16a5dfadcb618ce
d506fa9f5957183d7e05576620bc7470b1bc1b67
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 7a2a8fa..b876dbb 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -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

-- 
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énable

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbcon: fix obvious bug in fbcon logo rotation code
  2005-11-24 15:53 [PATCH] fbcon: fix obvious bug in fbcon logo rotation code Jasper Spaans
@ 2005-11-24 21:27 ` Antonino A. Daplas
  0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2005-11-24 21:27 UTC (permalink / raw)
  To: Jasper Spaans
  Cc: linux-kernel, Antonino Daplas, Andrew Morton, Linus Torvalds

Jasper Spaans wrote:
> From: Jasper Spaans <jasper@vs19.net>
> 
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-24 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-24 15:53 [PATCH] fbcon: fix obvious bug in fbcon logo rotation code Jasper Spaans
2005-11-24 21:27 ` Antonino A. Daplas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox