]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode().
authorMiguel Gómez <magomez@igalia.com>
Fri, 6 Jul 2012 10:40:43 +0000 (12:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2012 23:59:29 +0000 (16:59 -0700)
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main_26.c

index c1aa0375680fa80bc6e0a8ad25cce51d74262dbb..e5657ffa4cd01769d386064e3b8cd5f7a611da85 100644 (file)
@@ -305,7 +305,7 @@ invalid_mode:
 static void XGIfb_search_vesamode(struct xgifb_video_info *xgifb_info,
                                  unsigned int vesamode)
 {
-       int i = 0, j = 0;
+       int i = 0;
 
        if (vesamode == 0)
                goto invalid;
@@ -316,15 +316,13 @@ static void XGIfb_search_vesamode(struct xgifb_video_info *xgifb_info,
                if ((XGIbios_mode[i].vesa_mode_no_1 == vesamode) ||
                    (XGIbios_mode[i].vesa_mode_no_2 == vesamode)) {
                        xgifb_info->mode_idx = i;
-                       j = 1;
-                       break;
+                       return;
                }
                i++;
        }
 
 invalid:
-       if (!j)
-               pr_info("Invalid VESA mode 0x%x'\n", vesamode);
+       pr_info("Invalid VESA mode 0x%x'\n", vesamode);
 }
 
 static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex)