From: Miguel Gómez Date: Fri, 6 Jul 2012 10:40:43 +0000 (+0200) Subject: Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4362f5becde07b43ec9d57a6a713c955dd2703e8;p=linux-beck.git Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode(). Signed-off-by: Miguel Gómez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index c1aa0375680f..e5657ffa4cd0 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)