mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04: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 <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Sachin Shukla <[email protected]> [b.zolnierkie: split from the bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
6e376822ee
commit
8018ce3f20
1 changed files with 3 additions and 5 deletions
|
|
@ -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…
Reference in a new issue