linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/6] fbcon: Fix check after use
@ 2005-04-16  5:17 Antonino A. Daplas
  0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2005-04-16  5:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, Linux Fbdev development list

  This patch fixes a check after use found by the Coverity checker.

From: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 fbcon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
--- a/drivers/video/console/fbcon.c	2005-03-22 05:48:50 +08:00
+++ b/drivers/video/console/fbcon.c	2005-03-23 11:53:44 +08:00
@@ -906,10 +906,13 @@
 	struct vc_data *svc = *default_mode;
 	struct display *t, *p = &fb_display[vc->vc_num];
 	int logo = 1, new_rows, new_cols, rows, cols, charcnt = 256;
-	int cap = info->flags;
+	int cap;
 
 	if (info_idx == -1 || info == NULL)
 	    return;
+
+	cap = info->flags;
+
 	if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
 	    (info->fix.type == FB_TYPE_TEXT))
 		logo = 0;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-16  5:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-16  5:17 [PATCH 3/6] fbcon: Fix check after use 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;
as well as URLs for NNTP newsgroup(s).