staging: xgifb: remove unnecessary check
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 31 Dec 2014 11:27:46 +0000 (16:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Jan 2015 00:15:59 +0000 (16:15 -0800)
the check for htotal and vtotal is not required as we have already
checked for them and returned -EINVAL if any of them is zero.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main_26.c

index 709d49e7f3c9bfc001c6d73eeab184a160f6f9eb..74a8db8223fee605d33a8762eb74ba73dfc6cd44 100644 (file)
@@ -952,7 +952,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
        } pr_debug("var->pixclock=%d, htotal=%d, vtotal=%d\n",
                        var->pixclock, htotal, vtotal);
 
-       if (var->pixclock && htotal && vtotal) {
+       if (var->pixclock) {
                drate = 1000000000 / var->pixclock;
                hrate = (drate * 1000) / htotal;
                xgifb_info->refresh_rate = (unsigned int) (hrate * 2