[PATCH 08/19] Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode().

From: Miguel GÃmez
Date: Thu Jul 05 2012 - 10:49:20 EST


Signed-off-by: Miguel GÃmez <magomez@xxxxxxxxxx>
---
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 b360ad3..8ae9402 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -299,7 +299,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;
@@ -310,15 +310,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)
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/