diff mbox

[2/5] bcm2708_fb: remove redundant code as detected by static analysis

Message ID 1441880248-29315-3-git-send-email-paolo.pisati@canonical.com
State New
Headers show

Commit Message

Paolo Pisati Sept. 10, 2015, 10:17 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

static analysis with cppcheck detected some redundant code which
should probably be removed:

[drivers/video/fbdev/bcm2708_fb.c:269]: (style) Variable 'yres'
  is assigned a value that is never used.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 drivers/video/fbdev/bcm2708_fb.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox

Patch

diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 06a96d1..fed0672 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -263,12 +263,6 @@  static int bcm2708_fb_check_var(struct fb_var_screeninfo *var,
 	if (var->yoffset > var->yres_virtual - var->yres)
 		var->yoffset = var->yres_virtual - var->yres - 1;
 
-	yres = var->yres;
-	if (var->vmode & FB_VMODE_DOUBLE)
-		yres *= 2;
-	else if (var->vmode & FB_VMODE_INTERLACED)
-		yres = (yres + 1) / 2;
-
 	return 0;
 }