Skip to contentSkip to conversation

drivers/video/console/fbcon.c: fix a check after use

PATCH New Adrian Bunk 1 participant 1 message Apr 13, 2005

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

PATCH 1/1 drivers/video/console/fbcon.c: fix a check after use

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

---

This patch was already sent on:
- 27 Mar 2005

drivers/video/console/fbcon.c renamed from drivers/video/console/fbcon.c.old +4 -1
@@ -906,10 +906,13 @@ static void fbcon_init(struct vc_data *v
 	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;