summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb/XGI_main_26.c
diff options
context:
space:
mode:
authorMiguel Gómez <magomez@igalia.com>2012-06-18 13:12:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-18 17:20:20 -0700
commit47cee13d1dfe9867758c82a5ef93fd96629ceefd (patch)
tree4538aba642ad91eb419f06693aa8fb37149dbbaa /drivers/staging/xgifb/XGI_main_26.c
parent96cd1f8b41c36c2520cc8b524734784a9e995ff2 (diff)
Staging: xgifb: Remove XGIFAIL() macro and its calls.
XGIFAIL() prints a message and returns a value, but it's used only in one place. Better remove it and replace the call with the macro content. Signed-off-by: Miguel Gómez <magomez@igalia.com> 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index a45a497115ed..58cddb40f314 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1376,8 +1376,10 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
vtotal = var->upper_margin + var->yres + var->lower_margin
+ var->vsync_len;
- if (!(htotal) || !(vtotal))
- XGIFAIL("XGIfb: no valid timing data");
+ if (!(htotal) || !(vtotal)) {
+ pr_debug("XGIfb: no valid timing data\n");
+ return -EINVAL;
+ }
if (var->pixclock && htotal && vtotal) {
drate = 1000000000 / var->pixclock;