public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jasper Spaans <jasper@vs19.net>
To: linux-kernel@vger.kernel.org, Antonino Daplas <adaplas@pol.net>,
	Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] fbcon: fix obvious bug in fbcon logo rotation code
Date: Thu, 24 Nov 2005 16:53:36 +0100	[thread overview]
Message-ID: <20051124155336.GA7119@spaans.vs19.net> (raw)

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

             reply	other threads:[~2005-11-24 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-24 15:53 Jasper Spaans [this message]
2005-11-24 21:27 ` [PATCH] fbcon: fix obvious bug in fbcon logo rotation code Antonino A. Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051124155336.GA7119@spaans.vs19.net \
    --to=jasper@vs19.net \
    --cc=adaplas@pol.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox