video: vfb: Remove incorrect check
'yoffset' is unsigned and hence cannot be less than 0. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
b1dfee60c8
commit
1ca3bc11aa
1 changed files with 2 additions and 3 deletions
|
@ -390,9 +390,8 @@ static int vfb_pan_display(struct fb_var_screeninfo *var,
|
||||||
struct fb_info *info)
|
struct fb_info *info)
|
||||||
{
|
{
|
||||||
if (var->vmode & FB_VMODE_YWRAP) {
|
if (var->vmode & FB_VMODE_YWRAP) {
|
||||||
if (var->yoffset < 0
|
if (var->yoffset >= info->var.yres_virtual ||
|
||||||
|| var->yoffset >= info->var.yres_virtual
|
var->xoffset)
|
||||||
|| var->xoffset)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
if (var->xoffset + info->var.xres > info->var.xres_virtual ||
|
if (var->xoffset + info->var.xres > info->var.xres_virtual ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue