From 4362f5becde07b43ec9d57a6a713c955dd2703e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Miguel=20G=C3=B3mez?= Date: Fri, 6 Jul 2012 12:40:43 +0200 Subject: [PATCH] Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Gómez Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xgifb/XGI_main_26.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index c1aa037..e5657ff 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -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) -- 2.7.4