video: fbdev: intelfb: remove impossible condition
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 31 Aug 2016 15:44:29 +0000 (21:14 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 7 Sep 2016 08:16:05 +0000 (11:16 +0300)
xoffset and yoffset of struct fb_var_screeninfo are unsigned and so
they can never be less than 0.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/intelfb/intelfbdrv.c

index bf20744..ff2a5d2 100644 (file)
@@ -1301,11 +1301,6 @@ static int intelfb_check_var(struct fb_var_screeninfo *var,
                break;
        }
 
-       if (v.xoffset < 0)
-               v.xoffset = 0;
-       if (v.yoffset < 0)
-               v.yoffset = 0;
-
        if (v.xoffset > v.xres_virtual - v.xres)
                v.xoffset = v.xres_virtual - v.xres;
        if (v.yoffset > v.yres_virtual - v.yres)