mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 08:48:48 +00:00
video: fbdev: amifb: remove impossible condition
xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Cc: Timur Tabi <timur@tabi.org> 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> [b.zolnierkie: split from the bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
6e376822ee
commit
8018ce3f20
@ -1484,13 +1484,11 @@ static int ami_decode_var(struct fb_var_screeninfo *var, struct amifb_par *par,
|
||||
par->xoffset = var->xoffset;
|
||||
par->yoffset = var->yoffset;
|
||||
if (par->vmode & FB_VMODE_YWRAP) {
|
||||
if (par->xoffset || par->yoffset < 0 ||
|
||||
par->yoffset >= par->vyres)
|
||||
if (par->yoffset >= par->vyres)
|
||||
par->xoffset = par->yoffset = 0;
|
||||
} else {
|
||||
if (par->xoffset < 0 ||
|
||||
par->xoffset > upx(16 << maxfmode, par->vxres - par->xres) ||
|
||||
par->yoffset < 0 || par->yoffset > par->vyres - par->yres)
|
||||
if (par->xoffset > upx(16 << maxfmode, par->vxres - par->xres) ||
|
||||
par->yoffset > par->vyres - par->yres)
|
||||
par->xoffset = par->yoffset = 0;
|
||||
}
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user