From: Adrian Bunk Date: Sun, 1 May 2005 15:59:23 +0000 (-0700) Subject: [PATCH] fbcon: Fix check after use X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=306958e8e8d150b3e8bf13f66f3a6e9be7ee75ff;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] fbcon: Fix check after use This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 59e3b4b4e7e..b209adbd508 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -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;