Skip to contentSkip to conversation

staging: xgifb: remove unnecessary check

PATCH New Sudip Mukherjee 1 participant 1 message Dec 31, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: xgifb: remove unnecessary check

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.

---
 drivers/staging/xgifb/XGI_main_26.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/xgifb/XGI_main_26.c +1 -1
index 709d49e..74a8db8 100644
@@ -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
Signature · 1 line
1.8.1.2