mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
video: fbdev: fsl-diu-fb: remove impossible condition
xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: sachiniiitm@gmail.com Cc: ravikant.s2@samsung.com Cc: p.shailesh@samsung.com Cc: ashish.kalra@samsung.com Cc: vidushi.koul@samsung.com Signed-off-by: Sachin Shukla <sachin.s5@samsung.com> Acked-by: Timur Tabi <timur@tabi.org> [b.zolnierkie: split from the bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
8018ce3f20
commit
0704916a4b
1 changed files with 1 additions and 8 deletions
|
@ -703,12 +703,6 @@ static int fsl_diu_check_var(struct fb_var_screeninfo *var,
|
|||
if (var->yres_virtual < var->yres)
|
||||
var->yres_virtual = var->yres;
|
||||
|
||||
if (var->xoffset < 0)
|
||||
var->xoffset = 0;
|
||||
|
||||
if (var->yoffset < 0)
|
||||
var->yoffset = 0;
|
||||
|
||||
if (var->xoffset + info->var.xres > info->var.xres_virtual)
|
||||
var->xoffset = info->var.xres_virtual - info->var.xres;
|
||||
|
||||
|
@ -1254,8 +1248,7 @@ static int fsl_diu_pan_display(struct fb_var_screeninfo *var,
|
|||
(info->var.yoffset == var->yoffset))
|
||||
return 0; /* No change, do nothing */
|
||||
|
||||
if (var->xoffset < 0 || var->yoffset < 0
|
||||
|| var->xoffset + info->var.xres > info->var.xres_virtual
|
||||
if (var->xoffset + info->var.xres > info->var.xres_virtual
|
||||
|| var->yoffset + info->var.yres > info->var.yres_virtual)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue