diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-25 08:02:56 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-09-26 04:52:31 -0400 |
commit | 1ca3bc11aac3c53424e04f542ffc3bc87ebd339b (patch) | |
tree | c25f23ba01104b4e88248ce8803c8aa402ef249e /drivers/video/vfb.c | |
parent | b1dfee60c8eb35ba74f94d493864f3a55836b603 (diff) |
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>
Diffstat (limited to 'drivers/video/vfb.c')
-rw-r--r-- | drivers/video/vfb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index ee5985efa15c..ea2b523f804f 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -390,9 +390,8 @@ static int vfb_pan_display(struct fb_var_screeninfo *var, | |||
390 | struct fb_info *info) | 390 | struct fb_info *info) |
391 | { | 391 | { |
392 | if (var->vmode & FB_VMODE_YWRAP) { | 392 | if (var->vmode & FB_VMODE_YWRAP) { |
393 | if (var->yoffset < 0 | 393 | if (var->yoffset >= info->var.yres_virtual || |
394 | || var->yoffset >= info->var.yres_virtual | 394 | var->xoffset) |
395 | || var->xoffset) | ||
396 | return -EINVAL; | 395 | return -EINVAL; |
397 | } else { | 396 | } else { |
398 | if (var->xoffset + info->var.xres > info->var.xres_virtual || | 397 | if (var->xoffset + info->var.xres > info->var.xres_virtual || |