Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
video: fbdev: intelfb: remove impossible condition
Browse files Browse the repository at this point in the history
xoffset and yoffset of struct fb_var_screeninfo are unsigned and so
they can never be less than 0.

Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and tomba committed Sep 7, 2016
1 parent ee65e18 commit b6a694b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/video/fbdev/intelfb/intelfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b6a694b

Please sign in to comment.