diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2012-09-11 00:15:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-10 15:48:17 -0700 |
commit | d3ae5762c6f37f64f222c6a4027774c8077388f1 (patch) | |
tree | c831fac50cab5449c54cec79c295a630b04131c6 /drivers/staging/xgifb/XGI_main_26.c | |
parent | 14f7c11187ae5b128d5fc4d01b348cd6b44fc538 (diff) |
staging: xgifb: use "else if"
Use "else if" when possible to reduce nesting.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb/XGI_main_26.c')
-rw-r--r-- | drivers/staging/xgifb/XGI_main_26.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 0c859aecc225..7fc3049a709c 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -1397,11 +1397,10 @@ static int XGIfb_pan_display(struct fb_var_screeninfo *var, if (var->yoffset < 0 || var->yoffset >= info->var.yres_virtual || var->xoffset) return -EINVAL; - } else { - if (var->xoffset + info->var.xres > info->var.xres_virtual + } else if (var->xoffset + info->var.xres > info->var.xres_virtual || var->yoffset + info->var.yres - > info->var.yres_virtual) - return -EINVAL; + > info->var.yres_virtual) { + return -EINVAL; } err = XGIfb_pan_var(var, info); if (err < 0) |