Skip to contentSkip to conversation

fbcon: Fix check after use

PATCH In review Antonino A. Daplas 1 participant 1 message Apr 16, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 fbcon: Fix check after use

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

From: Adrian Bunk <[email protected]>

---

 fbcon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
drivers/video/console/fbcon.c +4 -1
diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
@@ -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