]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] fbcon: Fix check after use
authorAdrian Bunk <bunk@fs.tum.de>
Sun, 1 May 2005 15:59:23 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:23 +0000 (08:59 -0700)
This patch fixes a check after use found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/console/fbcon.c

index 59e3b4b4e7e3e29b8efc7ee2a38e12b6d2eb0ccf..b209adbd508a96df8285047be74e9b42dea55938 100644 (file)
@@ -906,10 +906,13 @@ static void fbcon_init(struct vc_data *vc, int init)
        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;